Including of logging information
This commit is contained in:
+5
-1
@@ -4349,10 +4349,14 @@ def api_library_scan_action():
|
||||
|
||||
due_date = now + datetime.timedelta(days=borrow_duration_days)
|
||||
|
||||
it.update_item_status(item_id, False, borrower_name)
|
||||
app.logger.info(f"Library scan action: borrowing item {item_id} for student card {student_card_id} until {due_date.isoformat()}")
|
||||
borrower_user = us.get_user_by_student_card(student_card_id)
|
||||
app.logger.info(f"Found borrower user: {borrower_user}")
|
||||
if not borrower_user or not borrower_user.get('_id'):
|
||||
app.logger.warning(f"No user found for student card {student_card_id}. Cannot record borrowing in ausleihungen.")
|
||||
return jsonify({'ok': False, 'message': 'Kein Benutzer für diesen Schülerausweis gefunden.'}), 404
|
||||
|
||||
it.update_item_status(item_id, False, borrower_name)
|
||||
au.add_ausleihung(
|
||||
item_id,
|
||||
str(borrower_user['_id']),
|
||||
|
||||
Reference in New Issue
Block a user