Skip to content

Commit 024c1bd

Browse files
committed
bugfix: capacity to parking_lots_count
1 parent 16f1d63 commit 024c1bd

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/api/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, db_manager):
4242

4343
def run(self, listen_on: URL):
4444
import uvicorn
45-
uvicorn.run(self.app, host=listen_on.host, port=listen_on.port)
45+
uvicorn.run(self.app, host=listen_on.host, port=int(listen_on.port))
4646

4747
def _setup_routes(self):
4848

src/db_manager/db_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ def update_camera(self, camera_id, updated_fields):
276276
def update_zone(self, zone_id, updated_fields):
277277
with self.get_session() as session:
278278
stmt = update(ParkingZone).where(ParkingZone.id == zone_id)
279+
updated_fields['parking_lots_count'] = updated_fields.pop('capacity')
279280

280281
stmt = stmt.values(
281282
updated_fields | {"updated_at": datetime.now(timezone.utc)}

0 commit comments

Comments
 (0)