Skip to content

Commit

Permalink
Update self_ref from organisations csv
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Jan 3, 2024
1 parent 9cbf70a commit c530bc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iatidq/dqorganisations.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def _importOrganisationPackages(fh, local):
def get_or_create_organisation(row):
organisation = models.Organisation.where(
organisation_code=row['organisation_code']).first()
if not organisation:
if organisation:
organisation.self_ref = row.get('self_ref')
db.session.add(organisation)
else:
organisation = addOrganisation(row)
return organisation

Expand Down

0 comments on commit c530bc7

Please sign in to comment.