some cleanups
This commit is contained in:
parent
831c45e1f5
commit
289206afc0
8 changed files with 20 additions and 17 deletions
|
|
@ -44,9 +44,9 @@ def listing_filter_options(func):
|
|||
)
|
||||
@click.option(
|
||||
"--max-bedrooms",
|
||||
default=5,
|
||||
default=10,
|
||||
help="Maximum number of bedrooms",
|
||||
type=click.IntRange(min=1),
|
||||
type=click.IntRange(min=1, max=10), # Right move gets unhappy with >10
|
||||
)
|
||||
@click.option(
|
||||
"--min-price",
|
||||
|
|
@ -56,9 +56,9 @@ def listing_filter_options(func):
|
|||
)
|
||||
@click.option(
|
||||
"--max-price",
|
||||
default=1000000,
|
||||
default=999_999,
|
||||
help="Maximum price",
|
||||
type=click.IntRange(min=0),
|
||||
type=click.IntRange(min=0, max=40_000), # 40k for renting
|
||||
)
|
||||
@click.option(
|
||||
"--district",
|
||||
|
|
@ -359,7 +359,7 @@ def populate_db(
|
|||
listings = Listing.get_all_listings(
|
||||
[path for path in pathlib.Path(data_dir).glob("*/listing.json")]
|
||||
)
|
||||
asyncio.run(repository.upsert_listings(listings))
|
||||
asyncio.run(repository.upsert_listings_legacy(listings))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue