Skip to content

Commit af829e7

Browse files
committed
Forgot to extract results of the database search
1 parent 06db6fa commit af829e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def get_or_create_db_entry(
138138
conditions = [
139139
getattr(table, key) == value for key, value in lookup_kwargs.items()
140140
]
141-
entry = session.execute(select(table).where(and_(*conditions)))
141+
entry = (
142+
session.execute(select(table).where(and_(*conditions))).scalars().first()
143+
)
142144
if entry:
143145
return entry
144146
# If not present, create and return new entry

0 commit comments

Comments
 (0)