Update configs.py to create config from id.

Signed-off-by: Johnny Downs <johnnydowns@protonmail.com>
This commit is contained in:
Johnny Downs 2018-12-24 06:59:19 -08:00
parent 7911c54635
commit dede52ab21
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ class ConfigCollection(Collection):
def create(self, **kwargs): def create(self, **kwargs):
obj = self.client.api.create_config(**kwargs) obj = self.client.api.create_config(**kwargs)
return self.prepare_model(obj) config = self.client.configs.get(obj.get('ID'))
return self.prepare_model(config)
create.__doc__ = APIClient.create_config.__doc__ create.__doc__ = APIClient.create_config.__doc__
def get(self, config_id): def get(self, config_id):