Circuits Import Completed table does not show terminations #7970

Closed
opened 2025-12-29 20:30:37 +01:00 by adam · 2 comments
Owner

Originally created by @candlerb on GitHub (May 1, 2023).

NetBox version

v3.4.10

Python version

3.8

Steps to Reproduce

  1. Create circuit type and provider (I am using "Internet" and "Cerberus" in the example below)
  2. Go to Circuits > Import
  3. Paste in the following:
[

{
"cid": "ID-TEST",
"provider": "Cerberus",
"type": "Internet",
"commit_rate": 200000,
"status":"decommissioned",
"description": "Testing Import",
"terminations": [{
"site": "Test",
"term_side": "A"
}]
}

]

Expected Behavior

Successful import and correct display of "Import Completed" table

Observed Behavior

Although the import completed successfully, the termination is not shown in the table, which makes the user think it was incomplete.

image

I was able to pin this down further: if I patch the CIRCUITTERMINATION_LINK template like this

diff --git a/netbox/circuits/tables/circuits.py b/netbox/circuits/tables/circuits.py
index e2cd2b9a9..ff6d70e63 100644
--- a/netbox/circuits/tables/circuits.py
+++ b/netbox/circuits/tables/circuits.py
@@ -13,10 +13,13 @@ __all__ = (


 CIRCUITTERMINATION_LINK = """
+AAA
 {% if value.site %}
   <a href="{{ value.site.get_absolute_url }}">{{ value.site }}</a>
 {% elif value.provider_network %}
   <a href="{{ value.provider_network.get_absolute_url }}">{{ value.provider_network }}</a>
+{% else %}
+BLAH [{{ value }}]
 {% endif %}
 """

then I see the following:
image

i.e. the "value" being provided to the circuit termination template at this point is None.

But this is weird, because if I then browse the list at /circuits/circuits/ I do see the termination:

image

Originally created by @candlerb on GitHub (May 1, 2023). ### NetBox version v3.4.10 ### Python version 3.8 ### Steps to Reproduce 1. Create circuit type and provider (I am using "Internet" and "Cerberus" in the example below) 2. Go to Circuits > Import 3. Paste in the following: ``` [ { "cid": "ID-TEST", "provider": "Cerberus", "type": "Internet", "commit_rate": 200000, "status":"decommissioned", "description": "Testing Import", "terminations": [{ "site": "Test", "term_side": "A" }] } ] ``` ### Expected Behavior Successful import and correct display of "Import Completed" table ### Observed Behavior Although the import completed successfully, the termination is not shown in the table, which makes the user think it was incomplete. ![image](https://user-images.githubusercontent.com/44789/235372302-49833adc-501a-4699-bc92-cdcdc948ab56.png) I was able to pin this down further: if I patch the CIRCUITTERMINATION_LINK template like this ``` diff --git a/netbox/circuits/tables/circuits.py b/netbox/circuits/tables/circuits.py index e2cd2b9a9..ff6d70e63 100644 --- a/netbox/circuits/tables/circuits.py +++ b/netbox/circuits/tables/circuits.py @@ -13,10 +13,13 @@ __all__ = ( CIRCUITTERMINATION_LINK = """ +AAA {% if value.site %} <a href="{{ value.site.get_absolute_url }}">{{ value.site }}</a> {% elif value.provider_network %} <a href="{{ value.provider_network.get_absolute_url }}">{{ value.provider_network }}</a> +{% else %} +BLAH [{{ value }}] {% endif %} """ ``` then I see the following: ![image](https://user-images.githubusercontent.com/44789/235430660-bb827b97-99fd-4fc1-beec-af4dca39eccc.png) i.e. the "value" being provided to the circuit termination template at this point is None. But this is weird, because if I then browse the list at `/circuits/circuits/` I *do* see the termination: ![image](https://user-images.githubusercontent.com/44789/235430874-b68a8b13-963f-4d7e-8142-001eeca56716.png)
adam added the type: bugstatus: revisions needed labels 2025-12-29 20:30:37 +01:00
adam closed this issue 2025-12-29 20:30:37 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (May 1, 2023):

While I can replicate this on 3.4.10, I cannot on 3.5.0. Do you have the possibility of confirming on 3.5.0?

There's not going to be any more 3.4.x releases, so if you can confirm I think this is technically resolved.

(Note that provider_account is required in 3.5.0, see #12396)

@kkthxbye-code commented on GitHub (May 1, 2023): While I can replicate this on 3.4.10, I cannot on 3.5.0. Do you have the possibility of confirming on 3.5.0? There's not going to be any more 3.4.x releases, so if you can confirm I think this is technically resolved. (Note that provider_account is required in 3.5.0, see #12396)
Author
Owner

@candlerb commented on GitHub (May 1, 2023):

I don't have a 3.5 test system currently, but if you can see the problem is gone, then I'm happy to close.

@candlerb commented on GitHub (May 1, 2023): I don't have a 3.5 test system currently, but if you can see the problem is gone, then I'm happy to close.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7970