Skip to content

Commit 9e5888c

Browse files
committed
chore: lint
1 parent ff99fe3 commit 9e5888c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

routers/web/shared/actions/variables.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,15 @@ func findVariable(ctx *context.Context, id int64, vCtx *variablesCtx) (*actions_
183183
return nil, false
184184
}
185185

186-
var variable *actions_model.ActionVariable
187-
if got, err := actions_model.FindVariables(ctx, opts); err != nil {
186+
got, err := actions_model.FindVariables(ctx, opts)
187+
if err != nil {
188188
ctx.ServerError("FindVariables", err)
189189
return nil, false
190190
} else if len(got) == 0 {
191191
ctx.NotFound("FindVariables", nil)
192192
return nil, false
193-
} else {
194-
variable = got[0]
195193
}
196-
return variable, true
194+
return got[0], true
197195
}
198196

199197
func VariableDelete(ctx *context.Context) {

0 commit comments

Comments
 (0)