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

Extend webhook create/update/delete tests

This commit is contained in:
jeremystretch
2021-06-01 09:04:01 -04:00
parent 3d1e4fde81
commit c88dcef900
2 changed files with 30 additions and 10 deletions

View File

@ -60,6 +60,7 @@ def _handle_changed_object(request, webhook_queue, sender, instance, **kwargs):
if m2m_changed and webhook_queue:
# TODO: Need more validation here
# TODO: Need to account for snapshot changes
instance.refresh_from_db() # Ensure that we're working with fresh M2M assignments
webhook_queue[-1]['data'] = serialize_for_webhook(instance)
else:
enqueue_object(webhook_queue, instance, request.user, request.id, action)