mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
fixes Save with update_fields did not affect any rows
This commit is contained in:
@@ -309,6 +309,7 @@ class Inventory(CommonModel, ResourceMixin):
|
|||||||
else:
|
else:
|
||||||
computed_fields.pop(field)
|
computed_fields.pop(field)
|
||||||
if computed_fields:
|
if computed_fields:
|
||||||
|
if len(computed_fields) > 0:
|
||||||
iobj.save(update_fields=computed_fields.keys())
|
iobj.save(update_fields=computed_fields.keys())
|
||||||
logger.debug("Finished updating inventory computed fields")
|
logger.debug("Finished updating inventory computed fields")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user