From fb71cafb51848dba589ba57c1a1dfc203dd4389a Mon Sep 17 00:00:00 2001 From: bctiemann Date: Thu, 19 Feb 2026 08:03:47 -0500 Subject: [PATCH] Closes: #21284: Mark request_id and username fields in EventContext as deprecated (#21485) Add searchable deprecation comments on request_id and username fields in EventContext. --- netbox/extras/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/extras/events.py b/netbox/extras/events.py index 5e80e3e05..782b29633 100644 --- a/netbox/extras/events.py +++ b/netbox/extras/events.py @@ -103,8 +103,8 @@ def enqueue_event(queue, instance, request, event_type): request=request, user=request.user, # Legacy request attributes for backward compatibility - username=request.user.username, - request_id=request.id, + username=request.user.username, # DEPRECATED, will be removed in NetBox v4.7.0 + request_id=request.id, # DEPRECATED, will be removed in NetBox v4.7.0 ) # Force serialization of objects prior to them actually being deleted if event_type == OBJECT_DELETED: