mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-20 15:57:59 +01:00
Compare commits
2 Commits
feature
...
21284-depr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4264895302 | ||
|
|
7f1f976d07 |
@@ -43,6 +43,9 @@ The resulting webhook payload will look like the following:
|
||||
}
|
||||
```
|
||||
|
||||
!!! note "Deprecation of legacy fields"
|
||||
The "request_id" and "username" fields in the webhook payload above are deprecated and should no longer be used. Support for them will be removed in a future release.
|
||||
|
||||
!!! note "Consider namespacing webhook data"
|
||||
The data returned from all webhook callbacks will be compiled into a single `context` dictionary. Any existing keys within this dictionary will be overwritten by subsequent callbacks which include those keys. To avoid collisions with webhook data provided by other plugins, consider namespacing your plugin's data within a nested dictionary as such:
|
||||
|
||||
|
||||
@@ -102,8 +102,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:
|
||||
|
||||
Reference in New Issue
Block a user