Update yeti.py

fix bugs key error
pull/488/head
Sebdraven 2021-04-19 13:47:45 +02:00
parent 0da40b34ee
commit b46a3a8885
1 changed files with 2 additions and 3 deletions

View File

@ -103,11 +103,10 @@ class Yeti():
obj_relation = self.__get_relation(obj_to_add)
if obj_relation:
url_object.add_attribute(obj_relation, obj_to_add['value'])
obj_relation = self.__get_relation(self.attribute)
obj_relation = self.__get_relation(self.attribute, is_yeti_object=False)
if obj_relation:
url_object.add_attribute(self.__get_relation(self.attribute, is_yeti_object=False),
url_object.add_attribute(obj_relation,
self.attribute['value'])
url_object.add_reference(self.attribute['uuid'], 'related_to')
print(url_object)
return url_object