fix bug when running onos tosca twice
diff --git a/xos/tosca/resources/onosapp.py b/xos/tosca/resources/onosapp.py
index 111cf9a..648bb09 100644
--- a/xos/tosca/resources/onosapp.py
+++ b/xos/tosca/resources/onosapp.py
@@ -43,9 +43,9 @@
if attrs:
attr = attrs[0]
if attr.value != value:
- self.info("updating attribute %s" % k)
- attrs.value = value
- attrs.save()
+ self.info("updating attribute %s" % prop_name)
+ attr.value = value
+ attr.save()
else:
self.info("adding attribute %s" % prop_name)
ta = TenantAttribute(tenant=obj, name=prop_name, value=value)