From 1f61f400b472907155fc3fd16f78e479da1e09ac Mon Sep 17 00:00:00 2001 From: Ben Maurer Date: Wed, 12 Aug 2020 02:14:28 +0200 Subject: [PATCH] Added the restock_multiple command using iregex to query items (#24) Removed previously added restock_multiple command and replaced icontains with iregex in the restock command Added the restock_multiple command using iregex to query items Reviewed-on: https://git.etztech.xyz/ZeroHD/Geoffrey/pulls/24 --- GeoffreyApp/api/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeoffreyApp/api/commands.py b/GeoffreyApp/api/commands.py index dec2ada..0249177 100644 --- a/GeoffreyApp/api/commands.py +++ b/GeoffreyApp/api/commands.py @@ -722,7 +722,7 @@ def restock(item_name, shop_name=None, discord_uuid=None, mc_uuid=None): owner = get_player(discord_uuid, mc_uuid) shop = get_location(owner, shop_name, Shop) - items = ItemListing.objects.filter(item_name__iexact=item_name, shop=shop).all() + items = ItemListing.objects.filter(item_name__iregex=item_name, shop=shop).all() if len(items) == 0: raise ItemNotFound