mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
more context for models (#19511)
make more usage of context, to have more db transaction in one session (make diff of #9307 smaller)
This commit is contained in:
@@ -88,7 +88,7 @@ func GetListLockHandler(ctx *context.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
lock, err := models.GetLFSLockByID(v)
|
||||
lock, err := models.GetLFSLockByID(ctx, v)
|
||||
if err != nil && !models.IsErrLFSLockNotExist(err) {
|
||||
log.Error("Unable to get lock with ID[%s]: Error: %v", v, err)
|
||||
}
|
||||
@@ -98,7 +98,7 @@ func GetListLockHandler(ctx *context.Context) {
|
||||
|
||||
path := ctx.FormString("path")
|
||||
if path != "" { // Case where we request a specific id
|
||||
lock, err := models.GetLFSLock(repository, path)
|
||||
lock, err := models.GetLFSLock(ctx, repository, path)
|
||||
if err != nil && !models.IsErrLFSLockNotExist(err) {
|
||||
log.Error("Unable to get lock for repository %-v with path %s: Error: %v", repository, path, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user