Skip to content

Commit 5148ae0

Browse files
add missing nil check before IsErrGroupNotExist call
1 parent add9ebe commit 5148ae0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/group/group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func UpdateGroup(ctx context.Context, group *Group) error {
331331
func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error {
332332
sess := db.GetEngine(ctx)
333333
ng, err := GetGroupByID(ctx, newParent)
334-
if !IsErrGroupNotExist(err) {
334+
if err != nil && !IsErrGroupNotExist(err) {
335335
return err
336336
}
337337
if ng != nil {

0 commit comments

Comments
 (0)