diff --git a/cmdb-api/api/lib/cmdb/value.py b/cmdb-api/api/lib/cmdb/value.py index 4976e8f..10c54a0 100644 --- a/cmdb-api/api/lib/cmdb/value.py +++ b/cmdb-api/api/lib/cmdb/value.py @@ -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 == 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)