mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fix unrestricted queries for Tags
This commit is contained in:
parent
e635dc1fb3
commit
1ed152cd49
@ -101,7 +101,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li role="presentation"{% if active_tab == 'inventory' %} class="active"{% endif %}>
|
<li role="presentation"{% if active_tab == 'inventory' %} class="active"{% endif %}>
|
||||||
<a href="{% url 'dcim:device_inventory' pk=device.pk %}">
|
<a href="{% url 'dcim:device_inventory' pk=device.pk %}">
|
||||||
Inventory <span class="badge">{{ device.inventoryitems.count }}</span>
|
Inventory <span class="badge">{{ device.inventoryitems.unrestricted.count }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if perms.dcim.napalm_read_device %}
|
{% if perms.dcim.napalm_read_device %}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
{% if iface.description %}
|
{% if iface.description %}
|
||||||
{{ iface.description }}<br/>
|
{{ iface.description }}<br/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for tag in iface.tags.all %}
|
{% for tag in iface.tags.all.unrestricted %}
|
||||||
{% tag tag %}
|
{% tag tag %}
|
||||||
{% empty %}
|
{% empty %}
|
||||||
{% if not iface.description %}—{% endif %}
|
{% if not iface.description %}—{% endif %}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<strong>Tags</strong>
|
<strong>Tags</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% for tag in tags.all %}
|
{% for tag in tags.all.unrestricted %}
|
||||||
{% tag tag url %}
|
{% tag tag url %}
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<span class="text-muted">No tags assigned</span>
|
<span class="text-muted">No tags assigned</span>
|
||||||
|
@ -215,7 +215,7 @@ def prepare_cloned_fields(instance):
|
|||||||
|
|
||||||
# Copy tags
|
# Copy tags
|
||||||
if is_taggable(instance):
|
if is_taggable(instance):
|
||||||
params['tags'] = ','.join([t.name for t in instance.tags.all()])
|
params['tags'] = ','.join([t.name for t in instance.tags.all().unrestricted()])
|
||||||
|
|
||||||
# Concatenate parameters into a URL query string
|
# Concatenate parameters into a URL query string
|
||||||
param_string = '&'.join(
|
param_string = '&'.join(
|
||||||
|
Loading…
Reference in New Issue
Block a user