Skip to content

Commit

Permalink
Changed upsert_institution to return a session.get()
Browse files Browse the repository at this point in the history
  • Loading branch information
jcadam14 committed Jan 11, 2024
1 parent 22dc087 commit a989931
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/entities/repos/institutions_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ async def upsert_institution(session: AsyncSession, fi: FinancialInstitutionDto)
del fi_data["sbl_institution_type_ids"]

db_fi = await session.merge(FinancialInstitutionDao(**fi_data))
await session.flush([db_fi])
await session.refresh(db_fi)
return db_fi
return await session.get(FinancialInstitutionDao, db_fi.lei)


async def add_domains(
Expand Down

0 comments on commit a989931

Please sign in to comment.