Use a readonly transaction to load module without update
Closes #12542 (grafted from 62775217456fe35fcc19a49d527f3baba67b0149) --HG-- branch : 6.0
This commit is contained in:
1 parent
be84f9a54d
commit
cf8f04be0b
1 file changed
+2
-2
@@ -437,10 +437,10 @@ def load_modules(
|
||||
Module.update_list()
|
||||
|
||||
if not Transaction().connection:
|
||||
with Transaction().start(database_name, 0):
|
||||
with Transaction().start(database_name, 0, readonly=not update):
|
||||
_load_modules(update)
|
||||
else:
|
||||
with Transaction().new_transaction(), \
|
||||
with Transaction().new_transaction(readonly=not update), \
|
||||
Transaction().set_user(0), \
|
||||
Transaction().reset_context():
|
||||
_load_modules(update)
|
||||
|
||||
Reference in new issue
Block a user