Skip to content

Commit f6bf235

Browse files
committed
[DOP-25645] fixes
1 parent 9339d73 commit f6bf235

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

data_rentgen/db/repositories/operation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async def create_or_update_bulk(self, operations: list[OperationDTO]) -> None:
2929
"started_at": operation.started_at,
3030
"ended_at": operation.ended_at,
3131
"description": operation.description,
32-
"sql_query_id": operation.sql_query_id,
32+
"sql_query_id": operation.sql_query.id if operation.sql_query else None,
3333
"group": operation.group,
3434
"position": operation.position,
3535
}
@@ -52,6 +52,7 @@ async def create_or_update_bulk(self, operations: list[OperationDTO]) -> None:
5252
"started_at": func.coalesce(bindparam("started_at"), Operation.started_at),
5353
"ended_at": func.coalesce(bindparam("ended_at"), Operation.ended_at),
5454
"description": func.coalesce(bindparam("description"), Operation.description),
55+
"sql_query_id": func.coalesce(bindparam("sql_query_id"), Operation.sql_query_id),
5556
"group": func.coalesce(bindparam("group"), Operation.group),
5657
"position": func.coalesce(bindparam("position"), Operation.position),
5758
},

0 commit comments

Comments
 (0)