Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodrig committed Jul 14, 2022
2 parents 1396d42 + d08e199 commit 98737f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion warp/xhr/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class ApplyError(Exception):
SeatAssign.login: l
} for l in apply_data['assign']['logins']]

rowCount = SeatAssign.insert(insertData).execute()
rowCount = SeatAssign.insert(insertData).as_rowcount().execute()

if rowCount != len(apply_data['assign']['logins']):
raise ApplyError("Number of affected row is different then in assign.logins.", 107)
Expand Down
3 changes: 2 additions & 1 deletion warp/xhr/zones.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ class ApplyError(Exception):
.on_conflict(
conflict_target=[ZoneAssign.zid,ZoneAssign.login],
update={ZoneAssign.zone_role: EXCLUDED.zone_role} ) \
.as_rowcount() \
.execute()

if rowCount != len(jsonData['change']):
Expand Down Expand Up @@ -382,7 +383,7 @@ class ApplyError(Exception):
dataInsert.append(entry)

if len(dataInsert):
rowCount = Seat.insert(dataInsert).execute()
rowCount = Seat.insert(dataInsert).as_rowcount().execute()
totalCount += rowCount

if totalCount != len(jsonData['addOrUpdate']):
Expand Down

0 comments on commit 98737f5

Please sign in to comment.