Fix unit tests
This commit is contained in:
parent
a29b46d091
commit
f31433c3ef
3 changed files with 41 additions and 4 deletions
|
|
@ -573,7 +573,7 @@ class AttributeHandler(object):
|
|||
attr_obj = attr_objs[0]
|
||||
# update an existing attribute object
|
||||
attr_obj.db_category = category
|
||||
attr_obj.db_lock_storage = lockstring
|
||||
attr_obj.db_lock_storage = lockstring or ''
|
||||
attr_obj.save(update_fields=["db_category", "db_lock_storage"])
|
||||
if strattr:
|
||||
# store as a simple string (will not notify OOB handlers)
|
||||
|
|
@ -590,7 +590,7 @@ class AttributeHandler(object):
|
|||
"db_attrtype": self._attrtype,
|
||||
"db_value": None if strattr else to_pickle(new_value),
|
||||
"db_strvalue": new_value if strattr else None,
|
||||
"db_lock_storage": lockstring}
|
||||
"db_lock_storage": lockstring or ''}
|
||||
new_attr = Attribute(**kwargs)
|
||||
new_attr.save()
|
||||
new_attrobjs.append(new_attr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue