Limited how many shops can appear in ?selling

doc_update
Joey Hines 2018-10-20 13:33:13 -05:00
parent 517cb21f14
commit 2557e75a2f
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ class DatabaseInterface:
def find_top_shops_selling_item(self, session, item_name):
expr = ItemListing.name.ilike('%{}%'.format(item_name))
result = session.query(func.min(ItemListing.normalized_price), ItemListing.shop_id).group_by(
ItemListing.shop_id).filter(expr).order_by(func.min(ItemListing.normalized_price)).all()
ItemListing.shop_id).filter(expr).order_by(func.min(ItemListing.normalized_price)).limit(5).all()
shop_list = []

View File

@ -253,7 +253,7 @@ class Shop(Location):
}
def inv_to_str(self):
if len(self.inventory.limit(25).all()) != 0:
if len(self.inventory.limit(15).all()) != 0:
inv = '\n**Inventory**:'
str_format = '{}\n{}'