diff --git a/pype/plugins/publish/collect_anatomy_instance_data.py b/pype/plugins/publish/collect_anatomy_instance_data.py index 99fbe8a52e..4fd657167c 100644 --- a/pype/plugins/publish/collect_anatomy_instance_data.py +++ b/pype/plugins/publish/collect_anatomy_instance_data.py @@ -149,10 +149,12 @@ class CollectAnatomyInstanceData(pyblish.api.ContextPlugin): "name": subset_name }) - subset_docs = list(io.find({ - "type": "subset", - "$or": subset_filters - })) + subset_docs = [] + if subset_filters: + subset_docs = list(io.find({ + "type": "subset", + "$or": subset_filters + })) subset_ids = [ subset_doc["_id"] diff --git a/pype/tools/settings/settings/widgets/categories.py b/pype/tools/settings/settings/widgets/categories.py index 40bd687faf..07f7291e91 100644 --- a/pype/tools/settings/settings/widgets/categories.py +++ b/pype/tools/settings/settings/widgets/categories.py @@ -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) diff --git a/pype/tools/settings/settings/widgets/widgets.py b/pype/tools/settings/settings/widgets/widgets.py index 656aaaa652..ccd437ece3 100644 --- a/pype/tools/settings/settings/widgets/widgets.py +++ b/pype/tools/settings/settings/widgets/widgets.py @@ -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