Commit 4a36fc9
authored
[FIX] queue_job: repoint default_env to SUPERUSER in runjob
runjob is declared auth="none", so _auth_method_none pins request.env
and transaction.default_env to a uid=None env. `env = http.request.env(
user=SUPERUSER_ID)` only creates a local superuser env, leaving the
default_env as uid=None. Any flush that goes through
Transaction.flush() -> default_env.flush_all() then recomputes stored
fields as uid=None and fails on anything dereferencing self.env.user.
`http.request.update_env(user=SUPERUSER_ID)` additionally sets
transaction.default_env to the superuser env.
Closes #9221 parent 52acb9d commit 4a36fc9
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
0 commit comments