Island: Simplify JSON logic inFileAgentConfigurationRepository
This commit is contained in:
parent
eb207de919
commit
82d8f5bacd
|
@ -31,10 +31,10 @@ class FileAgentConfigurationRepository(IAgentConfigurationRepository):
|
||||||
raise RetrievalError(f"Error retrieving the agent configuration: {err}")
|
raise RetrievalError(f"Error retrieving the agent configuration: {err}")
|
||||||
|
|
||||||
def store_configuration(self, agent_configuration: AgentConfiguration):
|
def store_configuration(self, agent_configuration: AgentConfiguration):
|
||||||
configuration_json = agent_configuration.dict()
|
configuration_json = agent_configuration.json()
|
||||||
|
|
||||||
self._file_repository.save_file(
|
self._file_repository.save_file(
|
||||||
AGENT_CONFIGURATION_FILE_NAME, io.BytesIO(json.dumps(configuration_json).encode())
|
AGENT_CONFIGURATION_FILE_NAME, io.BytesIO(configuration_json.encode())
|
||||||
)
|
)
|
||||||
|
|
||||||
def reset_to_default(self):
|
def reset_to_default(self):
|
||||||
|
|
Loading…
Reference in New Issue