From bf8e0be7c54b3a0174025a2e8bc3490372735815 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 26 Jan 2026 10:26:09 -0500 Subject: [PATCH] Misc cleanup --- netbox/extras/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netbox/extras/events.py b/netbox/extras/events.py index 82d0a3821..9c061bba9 100644 --- a/netbox/extras/events.py +++ b/netbox/extras/events.py @@ -27,11 +27,13 @@ class EventContext(UserDict): A custom dictionary that automatically serializes its associated object on demand. """ + # We're emulating a dictionary here (rather than using a custom class) because prior to NetBox v4.5.2, events were + # queued as dictionaries for processing by handles in EVENTS_PIPELINE. We need to avoid introducing any breaking + # changes until a suitable minor release. def __getitem__(self, item): if item == 'data' and 'data' not in self: data = serialize_for_event(self['object']) self.__setitem__('data', data) - return data return super().__getitem__(item)