Skip to content

Commit ff99fe3

Browse files
committed
fix: default
1 parent 0ec499f commit ff99fe3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

routers/web/shared/actions/variables.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,13 @@ func findVariable(ctx *context.Context, id int64, vCtx *variablesCtx) (*actions_
174174
switch {
175175
case vCtx.IsRepo:
176176
opts.RepoID = vCtx.RepoID
177-
case vCtx.IsOrg:
178-
opts.OwnerID = vCtx.OwnerID
179-
case vCtx.IsUser:
177+
case vCtx.IsOrg, vCtx.IsUser:
180178
opts.OwnerID = vCtx.OwnerID
181179
case vCtx.IsGlobal:
182180
// do nothing
181+
default:
182+
ctx.ServerError("findVariable", errors.New("unable to determine"))
183+
return nil, false
183184
}
184185

185186
var variable *actions_model.ActionVariable

0 commit comments

Comments
 (0)