From 43244f2856b842eb70a5d4dc0f404e85ffa8d1f8 Mon Sep 17 00:00:00 2001 From: rasmus Date: Fri, 13 Jun 2025 04:41:33 +0300 Subject: [PATCH] rm clone-with-slug Clones are rare, cloning is broken. It makes more sense to clone from an item's page. --- inventory-app/inventory.py | 9 +-------- inventory-app/templates/inventory_add_slug.html | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/inventory-app/inventory.py b/inventory-app/inventory.py index 4c7cf20..62275e4 100644 --- a/inventory-app/inventory.py +++ b/inventory-app/inventory.py @@ -390,7 +390,6 @@ def delete_thumbs(item): @page_inventory.route("/m/inventory/assign-mac/") @page_inventory.route("/m/inventory/assign-slug/") -@page_inventory.route("/m/inventory/clone-with-slug/") @page_inventory.route("/m/inventory") def view_inventory(slug=None): user = request.args.get("user", type=ObjectId) @@ -433,13 +432,7 @@ def view_inventory(slug=None): if slug and not public_view: template = "inventory_pick.html" - if request.path.startswith("/m/inventory/clone-with-slug"): - action_method = "get" - action_path = "clone-by-slug" - action_label = "Clone" - action_help = "Cloning item to new slug" - pick = True - elif request.path.startswith("/m/inventory/assign-slug"): + if request.path.startswith("/m/inventory/assign-slug"): q.update({"shortener.slug": None}) action_method = "get" action_path = "edit-by-slug" diff --git a/inventory-app/templates/inventory_add_slug.html b/inventory-app/templates/inventory_add_slug.html index e203e33..f8bf996 100644 --- a/inventory-app/templates/inventory_add_slug.html +++ b/inventory-app/templates/inventory_add_slug.html @@ -14,9 +14,6 @@ It can be assigned to an existing item or a new item can be created. - {% endblock %}