Merge pull request #1081 from pypeclub/bugifx/using_avalon_mongo_from_settings

Removed usage of AVALON_MONGO from settings
This commit is contained in:
Milan Kolar 2021-03-03 16:33:03 +01:00 committed by GitHub
commit ba912fabba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View file

@ -404,15 +404,6 @@ class ProjectWidget(SettingsCategoryWidget):
if self is saved_tab_widget:
return
system_settings = get_system_settings()
mongo_url = system_settings["modules"]["avalon"]["AVALON_MONGO"]
if not mongo_url:
mongo_url = os.environ["PYPE_MONGO"]
# If mongo url is not the same as was then refresh projects
if mongo_url != os.environ["AVALON_MONGO"]:
self.project_list_widget.refresh()
def _create_root_entity(self):
self.entity = ProjectSettings(change_state=False)
self.entity.on_change_callbacks.append(self._on_entity_change)

View file

@ -643,10 +643,7 @@ class ProjectListWidget(QtWidgets.QWidget):
items = [self.default]
system_settings = get_system_settings()
mongo_url = system_settings["modules"]["avalon"]["AVALON_MONGO"]
if not mongo_url:
mongo_url = os.environ["PYPE_MONGO"]
mongo_url = os.environ["PYPE_MONGO"]
# Force uninstall of whole avalon connection if url does not match
# to current environment and set it as environment