Skip to content

Commit 9892f75

Browse files
committed
fix: change existing data function name and add print statements
1 parent 132abc2 commit 9892f75

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

transfers/seed.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ def ensure_seed_prereqs() -> None:
6868
init_parameter()
6969

7070

71-
def seed_data_exists() -> bool:
71+
def contact_data_exists() -> bool:
7272
with session_ctx() as s:
7373
return s.scalar(select(Contact.id).limit(1)) is not None
7474

7575

7676
def seed_all(n: int = 5, skip_if_exists: bool = False):
7777
"""Seed roughly `n` of each main entity and connect them."""
78-
if skip_if_exists and seed_data_exists():
78+
if skip_if_exists and contact_data_exists():
79+
print("Contact data exists; skipping seeding.")
7980
return
8081
ensure_seed_prereqs()
8182
new_mexico_bounds = [
@@ -455,6 +456,7 @@ def seed_all(n: int = 5, skip_if_exists: bool = False):
455456
print(f"Error committing seed data: {e}")
456457
raise
457458

459+
print("Seeding data finished.")
458460

459461
if __name__ == "__main__":
460462
seed_all(5)

0 commit comments

Comments
 (0)