@digione/node-custom-api 0.1.9-beta5 → 0.1.9-beta6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/stream.js +4 -2
package/package.json
CHANGED
package/utils/stream.js
CHANGED
|
@@ -1655,8 +1655,10 @@ class StreamUtil {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
1657
|
}
|
|
1658
|
-
|
|
1659
|
-
|
|
1658
|
+
if (typeof field['sort_order'] == "undefined") {
|
|
1659
|
+
let sort_order = yield field_1.FieldModel.schema(this.ref, "_").max('sort_order', { where: { stream_id: stream['id'] } });
|
|
1660
|
+
field['sort_order'] = sort_order ? Number(sort_order + 1) : 1;
|
|
1661
|
+
}
|
|
1660
1662
|
if (!field['stream_id']) {
|
|
1661
1663
|
field['stream_id'] = stream['id'];
|
|
1662
1664
|
}
|