Skip to content

Commit 5531e68

Browse files
committed
Pass skip_if_exists=True when running seed from __main__
The Cypress CI runner calls python -m transfers.seed on each run. Without skip_if_exists, seed_all tries to insert contacts even when they already exist from a prior run, hitting the unique constraint on (name, organization) and crashing. The guard was already implemented in seed_all but not used at the call site.
1 parent e167081 commit 5531e68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

transfers/seed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,4 +460,4 @@ def seed_all(n: int = 5, skip_if_exists: bool = False):
460460

461461

462462
if __name__ == "__main__":
463-
seed_all(5)
463+
seed_all(5, skip_if_exists=True)

0 commit comments

Comments
 (0)