1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

fixes Save with update_fields did not affect any rows

This commit is contained in:
Chris Meyers 2016-07-05 11:46:46 -04:00
parent ab0fd8ddb1
commit 1aca42ae93

View File

@ -309,7 +309,8 @@ class Inventory(CommonModel, ResourceMixin):
else:
computed_fields.pop(field)
if computed_fields:
iobj.save(update_fields=computed_fields.keys())
if len(computed_fields) > 0:
iobj.save(update_fields=computed_fields.keys())
logger.debug("Finished updating inventory computed fields")
@property