Skip to content

Commit

Permalink
Removed call to tuple a list and just use the list directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jcadam14 committed Jan 5, 2024
1 parent e10aa57 commit d914430
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/entities/repos/institutions_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ async def upsert_institution(session: AsyncSession, fi: FinancialInstitutionDto)
# Populate with model objects from SBLInstitutionTypeDao and clear out
# the id field since it's just a view
if "sbl_institution_type_ids" in fi_data:
sbl_type_ids = tuple(fi_data["sbl_institution_type_ids"])
sbl_type_stmt = select(SBLInstitutionTypeDao).filter(SBLInstitutionTypeDao.id.in_(sbl_type_ids))
sbl_type_stmt = select(SBLInstitutionTypeDao).filter(SBLInstitutionTypeDao.id.in_(fi_data["sbl_institution_type_ids"]))
sbl_types = await session.scalars(sbl_type_stmt)
fi_data["sbl_institution_types"] = sbl_types.all()
del fi_data["sbl_institution_type_ids"]
Expand Down

0 comments on commit d914430

Please sign in to comment.