From 9ea445e338ce028d1ac13062a5035fba098686ea Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 2 Nov 2023 16:43:55 -0700 Subject: [PATCH] renamed variable --- google/cloud/firestore_v1/base_query.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/firestore_v1/base_query.py b/google/cloud/firestore_v1/base_query.py index b14fa03f23..198cacb59d 100644 --- a/google/cloud/firestore_v1/base_query.py +++ b/google/cloud/firestore_v1/base_query.py @@ -868,7 +868,7 @@ def _normalize_orders(self) -> list: _has_snapshot_cursor = True if _has_snapshot_cursor: # added orders should use direction of last order - direction = orders[-1].direction if orders else BaseQuery.ASCENDING + last_direction = orders[-1].direction if orders else BaseQuery.ASCENDING order_keys = [order.field.field_path for order in orders] for filter_ in self._field_filters: # FieldFilter.Operator should not compare equal to @@ -880,10 +880,10 @@ def _normalize_orders(self) -> list: filter_.op not in _EQUALITY_OPERATORS and field not in order_keys ): - orders.append(self._make_order(field, direction)) + orders.append(self._make_order(field, last_direction)) # add __name__ if not already in orders if "__name__" not in [order.field.field_path for order in orders]: - orders.append(self._make_order("__name__", direction)) + orders.append(self._make_order("__name__", last_direction)) return orders