mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-15 19:52:52 -06:00
Fixes #10040: Fix exception when ordering prefixes by flat representation
This commit is contained in:
parent
c7d6fe2d62
commit
279253c486
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#10040](https://github.com/netbox-community/netbox/issues/10040) - Fix exception when ordering prefixes by flat representation
|
||||||
* [#10053](https://github.com/netbox-community/netbox/issues/10053) - Custom fields header should not be displayed when editing circuit terminations with no custom fields
|
* [#10053](https://github.com/netbox-community/netbox/issues/10053) - Custom fields header should not be displayed when editing circuit terminations with no custom fields
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -32,15 +32,6 @@ PREFIX_LINK = """
|
|||||||
<a href="{% if record.pk %}{% url 'ipam:prefix' pk=record.pk %}{% else %}{% url 'ipam:prefix_add' %}?prefix={{ record }}{% if object.vrf %}&vrf={{ object.vrf.pk }}{% endif %}{% if object.site %}&site={{ object.site.pk }}{% endif %}{% if object.tenant %}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}{% endif %}{% endif %}">{{ record.prefix }}</a>
|
<a href="{% if record.pk %}{% url 'ipam:prefix' pk=record.pk %}{% else %}{% url 'ipam:prefix_add' %}?prefix={{ record }}{% if object.vrf %}&vrf={{ object.vrf.pk }}{% endif %}{% if object.site %}&site={{ object.site.pk }}{% endif %}{% if object.tenant %}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}{% endif %}{% endif %}">{{ record.prefix }}</a>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
PREFIXFLAT_LINK = """
|
|
||||||
{% load helpers %}
|
|
||||||
{% if record.pk %}
|
|
||||||
<a href="{% url 'ipam:prefix' pk=record.pk %}">{{ record.prefix }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ record.prefix }}
|
|
||||||
{% endif %}
|
|
||||||
"""
|
|
||||||
|
|
||||||
IPADDRESS_LINK = """
|
IPADDRESS_LINK = """
|
||||||
{% if record.pk %}
|
{% if record.pk %}
|
||||||
<a href="{{ record.get_absolute_url }}">{{ record.address }}</a>
|
<a href="{{ record.get_absolute_url }}">{{ record.address }}</a>
|
||||||
@ -229,9 +220,9 @@ class PrefixTable(TenancyColumnsMixin, NetBoxTable):
|
|||||||
export_raw=True,
|
export_raw=True,
|
||||||
attrs={'td': {'class': 'text-nowrap'}}
|
attrs={'td': {'class': 'text-nowrap'}}
|
||||||
)
|
)
|
||||||
prefix_flat = tables.TemplateColumn(
|
prefix_flat = tables.Column(
|
||||||
template_code=PREFIXFLAT_LINK,
|
accessor=Accessor('prefix'),
|
||||||
attrs={'td': {'class': 'text-nowrap'}},
|
linkify=True,
|
||||||
verbose_name='Prefix (Flat)',
|
verbose_name='Prefix (Flat)',
|
||||||
)
|
)
|
||||||
depth = tables.Column(
|
depth = tables.Column(
|
||||||
|
Loading…
Reference in New Issue
Block a user