This commit is contained in:
2023-04-02 23:07:16 +08:00
parent f3a863f55c
commit f1faeb038f
+3 -1
View File
@@ -190,7 +190,9 @@ class Connection extends Component
if ($restore === true) { if ($restore === true) {
return Context::setContext($this->cds, $this->getMasterClient()); return Context::setContext($this->cds, $this->getMasterClient());
} }
if (!Db::inTransactionsActive()) return $this->getMasterClient(); if (!Db::inTransactionsActive()) {
return $this->getMasterClient();
}
if (!Context::hasContext($this->cds)) { if (!Context::hasContext($this->cds)) {
return Context::setContext($this->cds, $this->getMasterClient()); return Context::setContext($this->cds, $this->getMasterClient());
} else { } else {