Fix owner URL in inventory headers and remove unused fields variable in table template

This commit is contained in:
Yaro Kasear 2025-08-21 12:00:13 -05:00
parent 79d94ff950
commit e0129e8246
2 changed files with 1 additions and 2 deletions

View file

@ -45,7 +45,7 @@ inventory_headers = {
"Model": lambda i: {"field": "model", "text": i.model},
"Item Type": lambda i: {"field": "device_type.description", "text": i.device_type.description} if i.device_type else {"text": None},
"Shared?": lambda i: {"field": "shared", "text": i.shared, "type": "bool", "html": checked_box if i.shared else unchecked_box},
"Owner": lambda i: {"field": "owner.identifier", "text": i.owner.identifier, "url": url_for("main.user", id=i.owner.id)} if i.owner else {"text": None},
"Owner": lambda i: {"field": "owner.identifier", "text": i.owner.identifier, "url": url_for("main.user_item", id=i.owner.id)} if i.owner else {"text": None},
"Location": lambda i: {"field": "location.identifier", "text": i.location.identifier} if i.location else {"Text": None},
"Condition": lambda i: {"field": "condition", "text": i.condition}
}

View file

@ -26,7 +26,6 @@
) }}
{% endblock %}
{% block content %}
{{ fields }}
{{ tables.dynamic_table(
id='table',
headers=header.keys()|list if header else [],