From 8729d60c1c4a866825affb597b6bf537fd3920e6 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 9 Jan 2023 10:57:13 -0500 Subject: [PATCH] Fixes #11402: Avoid LookupError exception when running scripts with commit disabled --- docs/release-notes/version-3.4.md | 1 + netbox/netbox/context.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-3.4.md b/docs/release-notes/version-3.4.md index a087e31b8..5a76a3dd4 100644 --- a/docs/release-notes/version-3.4.md +++ b/docs/release-notes/version-3.4.md @@ -16,6 +16,7 @@ * [#11340](https://github.com/netbox-community/netbox/issues/11340) - Avoid flagging cable termination changes erroneously * [#11379](https://github.com/netbox-community/netbox/issues/11379) - Fix TypeError exception when bulk editing custom date fields * [#11384](https://github.com/netbox-community/netbox/issues/11384) - Correct current time display on script & report forms +* [#11402](https://github.com/netbox-community/netbox/issues/11402) - Avoid LookupError exception when running scripts with commit disabled * [#11403](https://github.com/netbox-community/netbox/issues/11403) - Fix exception when scheduling a job in the past --- diff --git a/netbox/netbox/context.py b/netbox/netbox/context.py index b5e4dc28e..5461a4e94 100644 --- a/netbox/netbox/context.py +++ b/netbox/netbox/context.py @@ -7,4 +7,4 @@ __all__ = ( current_request = ContextVar('current_request', default=None) -webhooks_queue = ContextVar('webhooks_queue') +webhooks_queue = ContextVar('webhooks_queue', default=[])