Skip to content

Commit e36553a

Browse files
committed
fix fetching condition after insertion
1 parent f5232cb commit e36553a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gino/crud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ async def _execute_and_fetch(conn, query):
798798
key_getter = context.compiled._key_getters_for_crud_column[2]
799799
compiled_params = context.compiled_parameters[0]
800800
last_row_id = context.get_lastrowid()
801-
if last_row_id is not None:
801+
if last_row_id is not None or table.primary_key:
802802
lookup_conds = [
803803
c == last_row_id
804804
if c is table._autoincrement_column

0 commit comments

Comments
 (0)