dev: update instance configuration load

This commit is contained in:
pablohashescobar 2023-11-08 14:21:26 +00:00
parent f37bae9ad9
commit b90218580d

View File

@ -36,11 +36,13 @@ def load_config():
}
for key, value in config_keys.items():
obj, created = InstanceConfiguration.objects.update_or_create(
key=key, value=value
obj, created = InstanceConfiguration.objects.get_or_create(
key=key
)
action = "Created" if created else "Updated"
print(f"{action} {key} with value from environment variable.")
obj.value = value
obj.save()
print(f"{key} loaded with value from environment variable.")
if __name__ == "__main__":