cahnges to the decryption
This commit is contained in:
+7
-2
@@ -3075,6 +3075,9 @@ def library_loans_admin():
|
||||
|
||||
_ensure_audit_indexes_once()
|
||||
|
||||
# IMPORT HINZUGEFÜGT: Entschlüsselungs-Tool importieren
|
||||
from modules.inventarsystem.data_protection import decrypt_text
|
||||
|
||||
def fmt_dt(dt):
|
||||
try:
|
||||
return dt.strftime('%d.%m.%Y %H:%M') if dt else ''
|
||||
@@ -3121,6 +3124,9 @@ def library_loans_admin():
|
||||
item_has_damage = bool(item_doc.get('HasDamage')) or condition_value == 'destroyed' or bool(item_doc.get('DamageReports'))
|
||||
damage_reports = item_doc.get('DamageReports', []) or []
|
||||
|
||||
raw_user = record.get('User', '')
|
||||
decrypted_user = decrypt_text(raw_user) if raw_user else ''
|
||||
|
||||
loan_entries.append({
|
||||
'id': str(record.get('_id')),
|
||||
'item_id': item_id,
|
||||
@@ -3128,7 +3134,7 @@ def library_loans_admin():
|
||||
'item_code': item_doc.get('Code_4', ''),
|
||||
'item_author': item_doc.get('Author', ''),
|
||||
'item_isbn': item_doc.get('ISBN', ''),
|
||||
'user': record.get('User', ''),
|
||||
'user': decrypted_user,
|
||||
'status': record.get('Status', ''),
|
||||
'start': fmt_dt(record.get('Start')),
|
||||
'end': fmt_dt(record.get('End')),
|
||||
@@ -3181,7 +3187,6 @@ def library_loans_admin():
|
||||
if client:
|
||||
client.close()
|
||||
|
||||
|
||||
@app.route('/api/library_items')
|
||||
def api_library_items():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user