Skip to content

Commit 7ab7d19

Browse files
committed
chore(refactor): extract setting of db.tx_source out of if tree
1 parent 11956cb commit 7ab7d19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

roundup/cgi/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,18 +1694,17 @@ def opendb(self, username):
16941694
# open the database or only set the user
16951695
if not hasattr(self, 'db'):
16961696
self.db = self.instance.open(username)
1697-
self.db.tx_Source = "web"
16981697
elif self.instance.optimize:
16991698
self.db.setCurrentUser(username)
1700-
self.db.tx_Source = "web"
17011699
else:
17021700
self.db.close()
17031701
self.db = self.instance.open(username)
1704-
self.db.tx_Source = "web"
17051702
# The old session API refers to the closed database;
17061703
# we can no longer use it.
17071704
self.session_api = Session(self)
17081705

1706+
self.db.tx_Source = "web"
1707+
17091708
# match designator in URL stripping leading 0's. So:
17101709
# https://issues.roundup-tracker.org/issue002551190 is the same as
17111710
# https://issues.roundup-tracker.org/issue2551190

0 commit comments

Comments
 (0)