1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Cache custom fields on instance prior to save()

This commit is contained in:
Jeremy Stretch
2020-08-17 11:08:14 -04:00
parent 4ee8e473eb
commit dd707c97af
3 changed files with 13 additions and 7 deletions

View File

@ -25,10 +25,6 @@ def _handle_changed_object(request, sender, instance, **kwargs):
else:
return
# Cache any custom field values to ensure they are captured during serialization
if hasattr(instance, 'cache_custom_fields'):
instance.cache_custom_fields()
# Record an ObjectChange if applicable
if hasattr(instance, 'to_objectchange'):
objectchange = instance.to_objectchange(action)