Fix callnum handling

Update callnum only where there are other commits

Related: https://pagure.io/koji/issue/3658
This commit is contained in:
Tomas Kopecek 2023-01-17 14:52:02 +01:00
parent 99a7e44d2d
commit be1bf65f6f

View file

@ -209,6 +209,8 @@ class Session(object):
update = UpdateProcessor('sessions', rawdata={'callnum': callnum},
clauses=['id = %(id)i'], values={'id': id})
update.execute()
# we only want to commit the callnum change if there are other commits
context.commit_pending = False
# record the login data
self.id = id