mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
old mongo value is removed before change
This commit is contained in:
parent
261e1db2c0
commit
cbd40cd73b
1 changed files with 6 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ class OpenPypeSecureRegistry:
|
|||
import keyring
|
||||
|
||||
value = keyring.get_password(self._name, name)
|
||||
if value:
|
||||
if value is not None:
|
||||
return value
|
||||
|
||||
if default is not _PLACEHOLDER:
|
||||
|
|
@ -532,5 +532,9 @@ def change_openpype_mongo_url(new_mongo_url):
|
|||
"""
|
||||
|
||||
validate_mongo_connection(new_mongo_url)
|
||||
key = "openPypeMongo"
|
||||
registry = OpenPypeSecureRegistry("mongodb")
|
||||
registry.set_item("openPypeMongo", new_mongo_url)
|
||||
existing_value = registry.get_item(key, None)
|
||||
if existing_value is not None:
|
||||
registry.delete_item(key)
|
||||
registry.set_item(key, new_mongo_url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue