Error fixing and debugging implementation.
Release Inventarsystem / release-docker (push) Successful in 2m17s

This commit is contained in:
2026-08-17 00:39:38 +02:00
parent 41d9c0a848
commit 0ea5d2db26
2 changed files with 13 additions and 5 deletions
+4 -1
View File
@@ -3826,11 +3826,14 @@ def api_item_detail(item_id):
{f'<p><strong>Ausgeliehen von:</strong> {html.escape(str(borrower_value))}</p>' if borrower_value and status_label == 'Ausgeliehen' else ''} {f'<p><strong>Ausgeliehen von:</strong> {html.escape(str(borrower_value))}</p>' if borrower_value and status_label == 'Ausgeliehen' else ''}
{borrows_html} {borrows_html}
""" """
ctx = get_tenant_context()
current_tenant_id = ctx.tenant_id if ctx else None
client.close() client.close()
return jsonify({ return jsonify({
'html': detail_html, 'html': detail_html,
'images': item.get('Images', item.get('Bilder', [])) 'images': item.get('Images', item.get('Bilder', [])),
'tenant': str(current_tenant_id)
}), 200 }), 200
except Exception as e: except Exception as e:
app.logger.error(f"Error fetching item detail: {e}") app.logger.error(f"Error fetching item detail: {e}")
+8 -3
View File
@@ -1381,9 +1381,14 @@
: `/uploads/${image}`; : `/uploads/${image}`;
return ` return `
<div class="item-image-wrapper"> <div class="item-image-wrapper">
<img src="${imageSrc}" alt="Buchcover / Bild" class="item-image" loading="lazy"> <img src="${imageSrc}"
</div> alt="Buchcover"
class="item-image"
loading="lazy"
onload="console.log('Bild geladen:', '${imageSrc}')"
onerror="console.error('FEHLER beim Laden des Bildes im DOM:', '${imageSrc}')">
</div>
`; `;
}).join(''); }).join('');