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/24doc_update
parent
2e1967cb5a
commit
1f61f400b4
|
@ -722,7 +722,7 @@ def restock(item_name, shop_name=None, discord_uuid=None, mc_uuid=None):
|
||||||
owner = get_player(discord_uuid, mc_uuid)
|
owner = get_player(discord_uuid, mc_uuid)
|
||||||
shop = get_location(owner, shop_name, Shop)
|
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:
|
if len(items) == 0:
|
||||||
raise ItemNotFound
|
raise ItemNotFound
|
||||||
|
|
Loading…
Reference in New Issue