Skip to content

v2.1.1

Latest

Choose a tag to compare

@Kani999 Kani999 released this 18 Mar 09:14
ed27d11

netbox-custom-objects-tab v2.1.1

Highlights

Deferred DB queries — Typed-tab registration no longer queries the database during AppConfig.ready(), eliminating startup warnings from Django and netbox_branching.

What's Fixed

Fixed

  • Deferred typed-tab initialization — DB-dependent work (typed-tab registration, CO URL injection, registry deduplication) is now deferred to the first HTTP request via Django's request_started signal. This prevents:
    • Django warning: "Accessing the database during app initialization is discouraged"
    • netbox_branching warning: "Routing database query before branching support is initialized"
  • Combined tabs continue to register immediately during ready() (no DB access needed).
  • Thread-safe one-shot handler ensures deferred init runs exactly once, then disconnects itself.

Fixes #4

How It Works

register_tabs() is now two-phase:

  1. Phase 1 (ready()) — registers combined tabs (factory pattern, no DB queries)
  2. Phase 2 (first request) — a one-shot request_started signal handler registers typed tabs, injects CO URL patterns, and deduplicates the view registry

Compatibility

netbox-custom-objects-tab NetBox netbox_custom_objects
2.1.x 4.5.0–4.5.99 ≥ 0.4.6
2.0.x 4.5.0–4.5.99 ≥ 0.4.6

Links