add option to filter for min sqm per listing

This commit is contained in:
Viktor Barzin 2025-06-01 19:26:24 +00:00
parent 1c77c78518
commit 0acd417d34
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
3 changed files with 16 additions and 2 deletions

View file

@ -158,7 +158,7 @@ class Listing:
json.dump(objs, f)
@property
def sqm_model(self, recalculate=True):
def sqm_model(self, recalculate=True) -> float:
if not self.path_floorplan_model_json().exists() or recalculate:
self.calculate_sqm_model()
@ -193,7 +193,7 @@ class Listing:
with open(self.path_floorplan_ocr_json(), "w") as f:
json.dump(objs, f)
async def sqm_ocr(self, recalculate=False):
async def sqm_ocr(self, recalculate=False) -> float | None:
if not self.path_floorplan_ocr_json().exists() or recalculate:
await self.calculate_sqm_ocr()