[PR #16960] [CLOSED] Fixes #16937: Don't generate final navbar on file import #14961

Closed
opened 2025-12-30 00:19:09 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16960
Author: @Kek5chen
Created: 7/23/2024
Status: Closed

Base: developHead: fix/navbar-import


📝 Commits (1)

  • 1102c8d fix: don't generate final navbar on file import

📊 Changes

2 files changed (+35 additions, -20 deletions)

View changed files

📝 netbox/netbox/navigation/menu.py (+32 -19)
📝 netbox/utilities/templatetags/navigation.py (+3 -1)

📄 Description

Fixes: #16937

  • Instead of generating the final navigation bar, including plugins, when the menu module is imported, we lazy-generate it once, later before it's being used.

This has no breaking code impact, only visually and behaviorally, where a bug is fixed, that happens when trying to import (from) menu too early. See issue for more info.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/16960 **Author:** [@Kek5chen](https://github.com/Kek5chen) **Created:** 7/23/2024 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `fix/navbar-import` --- ### 📝 Commits (1) - [`1102c8d`](https://github.com/netbox-community/netbox/commit/1102c8d29139f22fe252d198376d560d86db03f8) fix: don't generate final navbar on file import ### 📊 Changes **2 files changed** (+35 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/navigation/menu.py` (+32 -19) 📝 `netbox/utilities/templatetags/navigation.py` (+3 -1) </details> ### 📄 Description ### Fixes: #16937 - Instead of generating the final navigation bar, including plugins, when the menu module is imported, we lazy-generate it once, later before it's being used. This has no breaking code impact, only visually and behaviorally, where a bug is fixed, that happens when trying to import *(from)* menu too early. See issue for more info. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:19:09 +01:00
adam closed this issue 2025-12-30 00:19:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14961