mirror of https://github.com/veops/cmdb.git
Update value.py
This commit is contained in:
parent
103596238e
commit
08fcac6a12
|
@ -161,7 +161,7 @@ class AttributeValueManager(object):
|
|||
self._write_change(ci.id, attr.id, OperateType.ADD, None, value)
|
||||
else:
|
||||
if existed_value != value:
|
||||
if value is not 0 and not value and attr.value_type != ValueTypeEnum.TEXT:
|
||||
if value == 0 and not value and attr.value_type != ValueTypeEnum.TEXT:
|
||||
existed_attr.delete()
|
||||
else:
|
||||
existed_attr.update(value=value)
|
||||
|
|
Loading…
Reference in New Issue