Compare commits

...

5 Commits

Author SHA1 Message Date
Aiirondev_dev a35bb3e048 Test data fixes
Release Inventarsystem / release-docker (push) Successful in 2m17s
2026-08-23 21:06:46 +02:00
Aiirondev_dev a0409a03dc Test data fixes
Release Inventarsystem / release-docker (push) Successful in 2m16s
2026-08-23 21:01:20 +02:00
Aiirondev_dev 627b1b76c4 Test data fixes
Release Inventarsystem / release-docker (push) Successful in 2m19s
2026-08-23 20:59:02 +02:00
Aiirondev_dev cd199f105d Test data
Release Inventarsystem / release-docker (push) Successful in 2m16s
2026-08-23 20:46:00 +02:00
Aiirondev_dev f77f7024dd Push notification fix
Release Inventarsystem / release-docker (push) Successful in 2m18s
2026-08-23 20:31:20 +02:00
2 changed files with 24 additions and 15 deletions
+15 -12
View File
@@ -3598,19 +3598,22 @@ def generate_test_ausleihen():
"Name": "Biologie Buch (Test Stufe 1)",
"ItemType": item_type,
"Verfuegbar": False,
"Exemplare": 1
"Exemplare": 1,
"Code_4": "TR-9988"
})
item2_res = items_col.insert_one({
"Name": "iPad Pro (Test Stufe 2)",
"ItemType": item_type,
"Verfuegbar": False,
"Exemplare": 1
"Exemplare": 1,
"Code_4": "TR-9988"
})
item3_res = items_col.insert_one({
"Name": "Taschenrechner (Test Frisch)",
"ItemType": item_type,
"Verfuegbar": False,
"Exemplare": 1
"Exemplare": 1,
"Code_4": "TR-9988"
})
# 3. Test-Ausleihungen generieren
@@ -3625,13 +3628,13 @@ def generate_test_ausleihen():
# Je nachdem, ob dein System die User-Felder in Ausleihungen verschlüsselt speichert:
# Hier wird encrypt_text verwendet, falls die Funktion im Scope liegt.
user_val_1 = encrypt_text("TEST-AUSWEIS-01") if 'encrypt_text' in globals() else "TEST-AUSWEIS-01"
user_val_2 = encrypt_text("TEST-AUSWEIS-02") if 'encrypt_text' in globals() else "TEST-AUSWEIS-02"
user_val_3 = encrypt_text("TEST-AUSWEIS-03") if 'encrypt_text' in globals() else "TEST-AUSWEIS-03"
user_val_1 = encrypt_text("TEST-AUSWEIS-01")
user_val_2 = encrypt_text("TEST-AUSWEIS-02")
user_val_3 = encrypt_text("TEST-AUSWEIS-03")
test_ausleihungen = [
{
"User": encrypt_text(user_val_1),
"User": user_val_1,
"Item": str(item1_res.inserted_id),
"Status": "active",
"DueDate": due_date_stufe1,
@@ -3639,7 +3642,7 @@ def generate_test_ausleihen():
"LastUpdated": current_time
},
{
"User": encrypt_text(user_val_2),
"User": user_val_2,
"Item": str(item2_res.inserted_id),
"Status": "active",
"DueDate": due_date_stufe2,
@@ -3647,11 +3650,11 @@ def generate_test_ausleihen():
"LastUpdated": due_date_stufe2
},
{
"User": encrypt_text(user_val_3),
"User": user_val_3,
"Item": str(item3_res.inserted_id),
"Status": "active",
"DueDate": due_date_frisch,
"Mahnstufe": 0,
"Mahnstufe": 2,
"LastUpdated": current_time
}
]
@@ -3766,7 +3769,7 @@ def mahnungen_admin():
days_overdue = (current_time_naive - due_date_naive).days
else:
days_overdue = 0
overdue_list.append({
overdue_list.append({
'id': str(record.get('_id')),
'item_name': item_name,
'item_code': item_code,
@@ -3778,7 +3781,7 @@ def mahnungen_admin():
'days_overdue': days_overdue,
'mahnstufe': record.get('Mahnstufe', 0),
'is_blocked': is_blocked
})
})
return render_template(
+9 -3
View File
@@ -17,7 +17,7 @@ def _build_smtp_client():
smtp.starttls()
smtp.ehlo()
if cfg.EMAIL_USERNAME:
smtp.login(cfg.EMAIL_USERNAME, cfg.EMAIL_PASSWORD or "")
smtp.login("no-reply@invario-software.de", "#,EATwIn,68" or "")
return smtp
@@ -68,14 +68,20 @@ def send(email: list | str, subject: str, note: str, sender: str) -> bool:
msg = MIMEMultipart("alternative")
msg["Subject"] = str(subject)
msg["From"] = f"{sender} <{cfg.EMAIL_USERNAME}>"
msg["From"] = f"{sender} <no-reply@invario-software.de>"
msg["To"] = str(recipient)
msg.attach(MIMEText(text_content, "plain"))
msg.attach(MIMEText(html_content, "html"))
#smtp.sendmail(
# from_addr=cfg.EMAIL_USERNAME,
# to_addrs=[recipient],
# msg=msg.as_string()
#)
smtp.sendmail(
from_addr=cfg.EMAIL_USERNAME,
from_addr="no-reply@invario-software.de",
to_addrs=[recipient],
msg=msg.as_string()
)