forked from github/plane
dev: update instance configuration load
This commit is contained in:
parent
f37bae9ad9
commit
b90218580d
@ -36,11 +36,13 @@ def load_config():
|
|||||||
}
|
}
|
||||||
|
|
||||||
for key, value in config_keys.items():
|
for key, value in config_keys.items():
|
||||||
obj, created = InstanceConfiguration.objects.update_or_create(
|
obj, created = InstanceConfiguration.objects.get_or_create(
|
||||||
key=key, value=value
|
key=key
|
||||||
)
|
)
|
||||||
action = "Created" if created else "Updated"
|
obj.value = value
|
||||||
print(f"{action} {key} with value from environment variable.")
|
obj.save()
|
||||||
|
|
||||||
|
print(f"{key} loaded with value from environment variable.")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user