Properly rephrase
All checks were successful
CI / Tests (test-types) (push) Successful in 1m40s
CI / Lint (push) Successful in 1m42s
CI / Tests (test) (push) Successful in 1m46s
CI / Tests (test-with-3.15) (push) Successful in 1m47s

This commit is contained in:
Alexander Hess 2026-12-04 16:09:45 +01:00
commit 4f76401446
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -207,8 +207,7 @@ class Pixel(meta.Base):
marker.add_to(self.grid.city.map)
if restaurants:
# Obtain all primary `Address`es in the city that host `Restaurant`s
# and are in the `self` `Pixel`
# All primary `Address`es in the pixel that host `Restaurant`s
addresses = db.session.scalars(
sa.select(db.Address).where(
db.Address.id.in_(
@ -242,13 +241,13 @@ class Pixel(meta.Base):
tooltip = f"Restaurants {ids}"
if order_counts:
# Calculate the number of orders for ALL restaurants ...
# Count the `Order`s of all `Restaurant`s at the `address` ...
n_orders = db.session.execute(
sa.select(sa.func.count(db.Order.id))
.join(db.Address, db.Order.pickup_address_id == db.Address.id)
.where(db.Address.primary_id == address.id),
).scalar_one()
# ... and adjust the size of the red dot on the `.map`
# ... and size the dot on the `.map` accordingly
if n_orders >= 1000:
radius = 20
elif n_orders >= 500: