@statezero/core 0.2.32 → 0.2.33
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.
|
@@ -45,8 +45,10 @@ function routeCreateOperation(operation, applyAction) {
|
|
|
45
45
|
const currentCount = store.groundTruthPks?.length || 0;
|
|
46
46
|
// At capacity: check if ordering could affect position
|
|
47
47
|
if (currentCount >= limit) {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
// Check explicit ordering on queryset OR implicit ordering from Django Meta
|
|
49
|
+
const hasExplicitOrdering = store.queryset._orderBy && store.queryset._orderBy.length > 0;
|
|
50
|
+
const hasImplicitOrdering = (modelClass.schema?.default_ordering?.length || 0) > 0;
|
|
51
|
+
if (hasExplicitOrdering || hasImplicitOrdering) {
|
|
50
52
|
// With ordering, new item could displace existing items - can't know without server
|
|
51
53
|
operationRegistry.setQuerysetState(operation.operationId, semanticKey, OperationMembership.MAYBE);
|
|
52
54
|
}
|
package/package.json
CHANGED