From 698d44f1c63e561b25409bb4d1a60de3f07ff003 Mon Sep 17 00:00:00 2001 From: Bryce Gattis Date: Sat, 2 Mar 2024 21:16:08 -0600 Subject: [PATCH] Only override location if artifact_path is supplied. Signed-off-by: Bryce Gattis --- src/rezplugins/package_repository/mongo.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/rezplugins/package_repository/mongo.py b/src/rezplugins/package_repository/mongo.py index bece153a3..d2f3bddc8 100644 --- a/src/rezplugins/package_repository/mongo.py +++ b/src/rezplugins/package_repository/mongo.py @@ -284,10 +284,6 @@ def install_variant(self, variant_resource: VariantResource, artifact_path=None, variant_name = variant_resource.name variant_version = variant_resource.version - # At this point, the variant_resource is in memory repository...? - - variant_location = artifact_path - if "name" in overrides: variant_name = overrides["name"] if variant_name is self.remove: @@ -307,7 +303,8 @@ def install_variant(self, variant_resource: VariantResource, artifact_path=None, variant_version = ver - overrides["location"] = variant_location + if artifact_path: + overrides["location"] = artifact_path post = self._get_variant_document(variant_resource, overrides) post_id = post.get("_id")