From 42760e5b9eed4150eb00f03154a307b73b6a33bc Mon Sep 17 00:00:00 2001 From: RubenPX Date: Wed, 11 May 2022 18:42:29 +0200 Subject: [PATCH] Fix print labels devices --- ereuse_devicehub/static/js/main_inventory.js | 2 ++ ereuse_devicehub/templates/inventory/device_list.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index 5db11bdd..9479fc48 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -111,6 +111,8 @@ window.addEventListener("DOMContentLoaded", () => { } else { btnSelectAll.disabled = false; } + + get_device_list(); } TableController.getAllDevices().forEach(item => { diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index 2b1d5cec..b457b080 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -392,7 +392,7 @@ {% for doc in lot.trade.documents %} - {% if doc.url.to_text() %} + {% if doc.url %} {{ doc.file_name}} {% else %} {{ doc.file_name}}