fix error when adding volt tenant
diff --git a/xos/tosca/resources/VOLTTenant.py b/xos/tosca/resources/VOLTTenant.py
index c9eceb4..20c4dfb 100644
--- a/xos/tosca/resources/VOLTTenant.py
+++ b/xos/tosca/resources/VOLTTenant.py
@@ -35,7 +35,9 @@
provider_service = args.get("provider_service", None)
service_specific_id = args.get("service_specific_id", None)
if (provider_service) and (service_specific_id):
- return [ self.get_xos_object(VOLTTenant, kind=VOLT_KIND, provider_service=provider_service, service_specific_id=service_specific_id) ]
+ existing_obj = self.get_xos_object(VOLTTenant, kind=VOLT_KIND, provider_service=provider_service, service_specific_id=service_specific_id, throw_exception=False)
+ if existing_obj:
+ return [ existing_obj ]
return []
def postprocess(self, obj):