Skip to content

Commit

Permalink
chore(refactor): extract setting of db.tx_source out of if tree
Browse files Browse the repository at this point in the history
  • Loading branch information
rouilj committed Mar 17, 2024
1 parent 11956cb commit 7ab7d19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions roundup/cgi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,18 +1694,17 @@ def opendb(self, username):
# open the database or only set the user
if not hasattr(self, 'db'):
self.db = self.instance.open(username)
self.db.tx_Source = "web"
elif self.instance.optimize:
self.db.setCurrentUser(username)
self.db.tx_Source = "web"
else:
self.db.close()
self.db = self.instance.open(username)
self.db.tx_Source = "web"
# The old session API refers to the closed database;
# we can no longer use it.
self.session_api = Session(self)

self.db.tx_Source = "web"

# match designator in URL stripping leading 0's. So:
# https://issues.roundup-tracker.org/issue002551190 is the same as
# https://issues.roundup-tracker.org/issue2551190
Expand Down

0 comments on commit 7ab7d19

Please sign in to comment.