File tree 4 files changed +4
-6
lines changed
4 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
11
11
"strings"
12
12
13
13
"code.gitea.io/gitea/models"
14
- "code.gitea.io/gitea/models/db"
15
14
"code.gitea.io/gitea/modules/context"
16
15
"code.gitea.io/gitea/modules/convert"
17
16
api "code.gitea.io/gitea/modules/structs"
@@ -100,7 +99,7 @@ func CreateLabel(ctx *context.APIContext) {
100
99
OrgID : ctx .Org .Organization .ID ,
101
100
Description : form .Description ,
102
101
}
103
- if err := models .NewLabel (db . DefaultContext , label ); err != nil {
102
+ if err := models .NewLabel (ctx , label ); err != nil {
104
103
ctx .Error (http .StatusInternalServerError , "NewLabel" , err )
105
104
return
106
105
}
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import (
12
12
"strings"
13
13
14
14
"code.gitea.io/gitea/models"
15
- "code.gitea.io/gitea/models/db"
16
15
"code.gitea.io/gitea/modules/context"
17
16
"code.gitea.io/gitea/modules/convert"
18
17
api "code.gitea.io/gitea/modules/structs"
@@ -162,7 +161,7 @@ func CreateLabel(ctx *context.APIContext) {
162
161
RepoID : ctx .Repo .Repository .ID ,
163
162
Description : form .Description ,
164
163
}
165
- if err := models .NewLabel (db . DefaultContext , label ); err != nil {
164
+ if err := models .NewLabel (ctx , label ); err != nil {
166
165
ctx .Error (http .StatusInternalServerError , "NewLabel" , err )
167
166
return
168
167
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ func NewLabel(ctx *context.Context) {
49
49
Description : form .Description ,
50
50
Color : form .Color ,
51
51
}
52
- if err := models .NewLabel (db . DefaultContext , l ); err != nil {
52
+ if err := models .NewLabel (ctx , l ); err != nil {
53
53
ctx .ServerError ("NewLabel" , err )
54
54
return
55
55
}
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ func NewLabel(ctx *context.Context) {
116
116
Description : form .Description ,
117
117
Color : form .Color ,
118
118
}
119
- if err := models .NewLabel (db . DefaultContext , l ); err != nil {
119
+ if err := models .NewLabel (ctx , l ); err != nil {
120
120
ctx .ServerError ("NewLabel" , err )
121
121
return
122
122
}
You can’t perform that action at this time.
0 commit comments