mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-07 16:12:17 +01:00
(refs #2133) Fix transaction isolation level issue in MariaDB
This commit is contained in:
@@ -352,7 +352,9 @@ trait ApiControllerBase extends ControllerBase {
|
||||
data.auto_init
|
||||
)
|
||||
Await.result(f, Duration.Inf)
|
||||
val repository = getRepository(groupName, data.name).get
|
||||
val repository = Database() withTransaction { session =>
|
||||
getRepository(groupName, data.name).get
|
||||
}
|
||||
JsonFormat(ApiRepository(repository, ApiUser(getAccountByUserName(groupName).get)))
|
||||
} else {
|
||||
ApiError(
|
||||
|
||||
Reference in New Issue
Block a user