some more improvements for the appointment borrowing function
Release Inventarsystem / release-docker (push) Successful in 2m30s

This commit is contained in:
2026-09-15 20:20:52 +02:00
parent a8f3907f34
commit 9ad81d9b6d
2 changed files with 95 additions and 58 deletions
+11 -1
View File
@@ -353,7 +353,7 @@ def cancel_ausleihung(id):
# Mark the booking as cancelled
result = ausleihungen.update_one(
{'_id': ObjectId(id)},
{'_id': ObjectId(id), 'Status': {'$in': ['planned', 'active']}},
{'$set': {
'Status': 'cancelled',
'LastUpdated': datetime.datetime.now(ZoneInfo("Europe/Berlin"))
@@ -367,6 +367,16 @@ def cancel_ausleihung(id):
return False
def get_booking(id):
"""Compatibility wrapper for the booking route."""
return get_ausleihung(id)
def cancel_booking(id):
"""Compatibility wrapper for the booking route."""
return cancel_ausleihung(id)
def remove_ausleihung(id):
"""
Markiert einen Ausleihungsdatensatz als gelöscht (Soft-Delete).