Add missing values to record Organize filter construction
Previous version defaulted filter's module and namespace references if not provided; the new one does not which would cause all the records to be used.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user