We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06db6fa commit af829e7Copy full SHA for af829e7
tests/conftest.py
@@ -138,7 +138,9 @@ def get_or_create_db_entry(
138
conditions = [
139
getattr(table, key) == value for key, value in lookup_kwargs.items()
140
]
141
- entry = session.execute(select(table).where(and_(*conditions)))
+ entry = (
142
+ session.execute(select(table).where(and_(*conditions))).scalars().first()
143
+ )
144
if entry:
145
return entry
146
# If not present, create and return new entry
0 commit comments