This commit is contained in:
+3
-3
@@ -9127,15 +9127,15 @@ def library_item_invoices(item_id):
|
|||||||
ausleihungen = db['ausleihungen']
|
ausleihungen = db['ausleihungen']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
item_doc = items_col.find_one({'_id': ObjectId(item_id)})
|
item_doc = ausleihungen.find_one({'_id': ObjectId(item_id)})
|
||||||
except Exception:
|
except Exception:
|
||||||
item_doc = items_col.find_one({'_id': item_id})
|
item_doc = ausleihungen.find_one({'_id': item_id})
|
||||||
|
|
||||||
if not item_doc:
|
if not item_doc:
|
||||||
flash('Bibliotheksmedium nicht gefunden.', 'error')
|
flash('Bibliotheksmedium nicht gefunden.', 'error')
|
||||||
return redirect(url_for('library_loans_admin'))
|
return redirect(url_for('library_loans_admin'))
|
||||||
|
|
||||||
borrow_docs = list(ausleihungen.find(
|
borrow_docs = list(items_col.find(
|
||||||
{
|
{
|
||||||
'Item': str(item_doc.get('_id')),
|
'Item': str(item_doc.get('_id')),
|
||||||
'InvoiceData': {'$exists': True, '$ne': {}}
|
'InvoiceData': {'$exists': True, '$ne': {}}
|
||||||
|
|||||||
Reference in New Issue
Block a user