Compare commits
2 Commits
f793bd01e1
...
1808c3e8fb
| Author | SHA1 | Date | |
|---|---|---|---|
| 1808c3e8fb | |||
| 971cf8d6b6 |
@@ -307,11 +307,12 @@ def checkout(user, barcode, loc=None):
|
||||
loc = None
|
||||
if itm:
|
||||
itm.checkout = True
|
||||
if user is not False:
|
||||
itm.checkout_user = user
|
||||
itm.checkout_loc = loc
|
||||
itm.save()
|
||||
itmdict = item.select().where(item.barcode==itm.barcode).dicts()[0]
|
||||
itmdict["location"] = fancy_location(item.select().where(item.barcode==itm["barcode"])[0].loc)
|
||||
itmdict["location"] = fancy_location(item.select().where(item.barcode==itmdict["barcode"])[0].loc)
|
||||
search.add_document(itmdict)
|
||||
return itm
|
||||
else:
|
||||
@@ -324,12 +325,13 @@ def checkin(user, barcode, loc=None):
|
||||
if itm:
|
||||
print("Found", itm.fullname)
|
||||
itm.checkout = False
|
||||
if user is not False:
|
||||
itm.last_user = user
|
||||
if loc is not None:
|
||||
itm.loc = loc
|
||||
itm.save()
|
||||
itmdict = item.select().where(item.barcode==itm.barcode).dicts()[0]
|
||||
itmdict["location"] = fancy_location(item.select().where(item.barcode==itm["barcode"])[0].loc)
|
||||
itmdict["location"] = fancy_location(item.select().where(item.barcode==itmdict["barcode"])[0].loc)
|
||||
search.add_document(itmdict)
|
||||
return itm
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user