fix of the template name
Release Inventarsystem / release-docker (push) Successful in 2m15s

This commit is contained in:
2026-08-12 11:45:48 +02:00
parent dd3d8649a7
commit 96d45710ac
3 changed files with 83 additions and 61 deletions
+13
View File
@@ -27,6 +27,19 @@ from Web.modules.database.settings import MongoClient
import Web.modules.inventarsystem.data_protection as dp
def is_library_item(item):
"""
Determines if an item belongs to the library system.
Returns False for 'other', None, or empty ItemType (Inventory item).
Returns True for any specific library type ('Buch', 'CD', 'DVD', etc.).
"""
if not item:
return False
item_type = item.get('ItemType', 'other')
if not item_type:
return False
return str(item_type).strip().lower() != 'other'
def safe_decrypt_user(encrypted_user):
"""
Safely decrypt an encrypted username string.