Skip to content

Prevent Firestore complaining when doing an offset on a query without an explicit ordering

Without this fix, doing queryset[offset:] results in Firestore giving this error:

ValueError: Attempting to create a cursor with no fields to order on. When defining a cursor with one of ``start_at()`` / ``start_after()`` / ``end_before()`` / ``end_at()``, all fields in the cursor must come from fields set in ``order_by()``.

Merge request reports