From 5ae9d09e983db6269240eb5d24dbdf792dfadedb Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Wed, 20 Oct 2021 23:27:07 -0700 Subject: [PATCH] fix: remove unused "Merge into" input from /packages When using this input on `live` as a TU, the field is not taken into account. Tried with no action and with the Delete Packages action, which ended up deleting the packages but not merging into the given target. So, this commit removes that input from the page. Signed-off-by: Kevin Morris --- aurweb/routers/packages.py | 4 +--- templates/partials/packages/search_actions.html | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/aurweb/routers/packages.py b/aurweb/routers/packages.py index 40a65933..20d34c86 100644 --- a/aurweb/routers/packages.py +++ b/aurweb/routers/packages.py @@ -1053,7 +1053,6 @@ PACKAGE_ACTIONS = {} async def packages_post(request: Request, IDs: List[int] = Form(default=[]), action: str = Form(default=str()), - merge_into: str = Form(default=str()), confirm: bool = Form(default=False)): # If an invalid action is specified, just render GET /packages @@ -1067,8 +1066,7 @@ async def packages_post(request: Request, # We deal with `IDs`, `merge_into` and `confirm` arguments # within action callbacks. callback = PACKAGE_ACTIONS.get(action) - retval = await callback(request, package_ids=IDs, merge_into=merge_into, - confirm=confirm) + retval = await callback(request, package_ids=IDs, confirm=confirm) if retval: # If *anything* was returned: success, messages = retval if not success: diff --git a/templates/partials/packages/search_actions.html b/templates/partials/packages/search_actions.html index 221189fb..f28e27a9 100644 --- a/templates/partials/packages/search_actions.html +++ b/templates/partials/packages/search_actions.html @@ -11,11 +11,6 @@ - {% if request.user.is_trusted_user() or request.user.is_developer() %} - - - {% endif %} -