Skip to content

Commit

Permalink
Fix agency code genderation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehmassgov committed Dec 3, 2024
1 parent bf36855 commit 62996c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/tests/src/db/models/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,7 @@ def _setup_next_sequence(cls):
agency_id = factory.Sequence(lambda n: n)
agency_name = factory.Faker("agency_name")

# Make agency_code unique by including the sequence number
agency_code = factory.Sequence(lambda n: f"AG-{n:04d}")
agency_code = factory.Iterator(CustomProvider.AGENCIES)

sub_agency_code = factory.LazyAttribute(lambda a: a.agency_code.split("-")[0])

Expand Down

0 comments on commit 62996c7

Please sign in to comment.