Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge 9e9eb21 into a7d890c
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzhygaly committed May 24, 2018
2 parents a7d890c + 9e9eb21 commit d013727
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion asyncpg_simpleorm/async_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ async def get_one(cls, record: bool=None, **kwargs) -> typing.Any:
# get the result from the database.
res = await conn.fetchrow(*stmt)

if record is False:
if res and record is False:
# return instances of the class, not records
return cls.from_record(res)
# return instances of the asyncpg record class
Expand Down
2 changes: 1 addition & 1 deletion asyncpg_simpleorm/statements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _parse_where_items(self,
raise TypeError()

# return the partial ``where`` string and args.
return ' AND'.join(strings), tuple(args)
return ' AND '.join(strings), tuple(args)

def _parse_where(self, primary_keys=False):
"""Parses the ``model`` or ``kwargs`` set on an instance and builds
Expand Down

0 comments on commit d013727

Please sign in to comment.