Add vacate button
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful

This commit is contained in:
2023-11-26 00:44:10 +02:00
parent 17ea3dd87f
commit 94093a361e
2 changed files with 12 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ def view_inventory_view(item_id):
user = read_user()
template = "inventory_view.html"
item = db.inventory.find_one({ "_id": ObjectId(item_id) })
item_user = item.get("inventory", {}).get("user", {}).get("username", None)
if not user:
if not item["inventory"].get("public"):
return do_login()
@@ -31,6 +32,7 @@ def view_inventory_view(item_id):
else:
can_audit = "k-space:janitors" in user["groups"]
can_edit = check_edit_permission(item_id)
is_using = item_user and item_user == user["username"]
bucket=get_bucket()
photo_url = bucket.generate_presigned_url(
ClientMethod='get_object',