Skip to content

Commit

Permalink
Update routes/dictionary_mapper_api.py
Browse files Browse the repository at this point in the history
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
  • Loading branch information
cbrianbet and sourcery-ai[bot] authored Dec 9, 2024
1 parent 54c6639 commit b3c9ba7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions routes/dictionary_mapper_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ async def load_data(baselookup:str, db_session: Session = Depends(get_db)):
def expected_variables_dqa(data, lookup):
valid_match = True
try:
dictionary = DataDictionaries.objects.filter(name=lookup).first()
if dictionary:
if dictionary := DataDictionaries.objects.filter(name=lookup).first():
dictionary_terms = DataDictionaryTerms.objects.filter(dictionary_id=dictionary.id).all()
for term in dictionary_terms:
column_data = data.get(term.term)
Expand Down

0 comments on commit b3c9ba7

Please sign in to comment.