Skip to content

Commit

Permalink
(PC-33174)[API] script: keep wrong OA info and ensure unique label
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaubert-pass committed Nov 22, 2024
1 parent 939c80b commit 04b80fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/tests/scripts/oa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ def get_inconsistent_venue_addresses() -> list[offerers_models.Venue]:


def create_venue_address_as_manual(venues: list[offerers_models.Venue]):
incorrect_oa_label = "Localisation erronée - Structure "
for venue in venues:
# Duplicate OA to keep the informations
offerers_api.create_offerer_address(
offerer_id=venue.offererAddress.offererId,
address_id=venue.offererAddress.addressId,
label=None,
label=f"{incorrect_oa_label}{venue.id}",
)
# Create new address
address = offerers_api.get_or_create_address(
Expand All @@ -47,7 +48,7 @@ def create_venue_address_as_manual(venues: list[offerers_models.Venue]):
longitude=venue.longitude,
street=venue.street,
# insee_code=venue.citycode,
ban_id=venue.banId,
# ban_id=venue.banId,
),
is_manual_edition=True,
)
Expand Down

0 comments on commit 04b80fe

Please sign in to comment.