Island, Agent: Fix bugs in credential object creation

This commit is contained in:
vakaris_zilius 2022-09-02 07:40:49 +00:00
parent 7149c704a2
commit d347521a29
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class ControlChannel(IControlChannel):
)
response.raise_for_status()
return [Credentials.from_mapping(credentials) for credentials in response.json()]
return [Credentials(**credentials) for credentials in response.json()]
except (
requests.exceptions.JSONDecodeError,
requests.exceptions.ConnectionError,

View File

@ -29,7 +29,7 @@ class PropagationCredentials(AbstractResource):
return propagation_credentials, HTTPStatus.OK
def put(self, collection=None):
credentials = [Credentials.parse_raw(c) for c in request.json]
credentials = [Credentials(**c) for c in request.json]
if collection == _configured_collection:
self._credentials_repository.remove_configured_credentials()
self._credentials_repository.save_configured_credentials(credentials)