Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified __pycache__/db.cpython-38.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ def max_price():

max_price = cur.fetchall()

if max_price[0][0] is None:
return 10

return max_price[0][0]


Expand Down
7 changes: 6 additions & 1 deletion pages/Leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@

ids = db.distinct_business_ids()

number_names = st.slider("Number of Businesses", min_value=1, max_value=len(ids))
num_ids = len(ids)

if num_ids < 2:
num_ids = 2

number_names = st.slider("Number of Businesses", min_value=1, max_value=num_ids)

businesses = db.displayLeaderboard(number_names)

Expand Down
2 changes: 1 addition & 1 deletion pages/Listings.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def filter_interface():

max_item_price = math.ceil(db.max_price())

price = st.slider("Listings price", value = (0, max_item_price), step = 1)
price = st.slider("Listings price ($)", value = (0, max_item_price), step = 1)

filter_dict["price"] = price

Expand Down