Skip to content

Commit

Permalink
fix fetching condition after insertion
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwjfy committed Sep 13, 2020
1 parent fd9cb88 commit 291189c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gino/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ async def _execute_and_fetch(conn, query):
key_getter = context.compiled._key_getters_for_crud_column[2]
compiled_params = context.compiled_parameters[0]
last_row_id = context.get_lastrowid()
if last_row_id is not None:
if last_row_id is not None or table.primary_key:
lookup_conds = [
c == last_row_id
if c is table._autoincrement_column
Expand Down

0 comments on commit 291189c

Please sign in to comment.