diff --git a/compose/service/record.go b/compose/service/record.go index 1c2d1b6c5..78fb14793 100644 --- a/compose/service/record.go +++ b/compose/service/record.go @@ -1291,7 +1291,10 @@ func (svc record) Organize(ctx context.Context, namespaceID, moduleID, recordID // We are interested only in records that have value of a sorting field greater than // the place we're moving our record to. // and sort the set with sorting field - reorderFilter := types.RecordFilter{} + reorderFilter := types.RecordFilter{ + ModuleID: moduleID, + NamespaceID: namespaceID, + } reorderFilter.Query = fmt.Sprintf("%s(%s >= %d)", filter, posField, recordOrderPlace) if err = reorderFilter.Sort.Set(posField); err != nil { return err