zenaight commited on
Commit ·
cfb0b1f
1
Parent(s): 7afea51
Refine property search query ordering in database
Browse files- Updated the property search query in `search_properties` to remove the `desc` parameter for price ordering, aligning with best practices and improving clarity in the query structure.
- database.py +1 -1
database.py
CHANGED
|
@@ -326,7 +326,7 @@ async def search_properties(filters: dict) -> list:
|
|
| 326 |
query = query.contains("features", [feat])
|
| 327 |
|
| 328 |
# e. Order & limit
|
| 329 |
-
query = query.order("is_featured", desc=True).order("price"
|
| 330 |
|
| 331 |
# f. Execute and return
|
| 332 |
resp = query.execute()
|
|
|
|
| 326 |
query = query.contains("features", [feat])
|
| 327 |
|
| 328 |
# e. Order & limit
|
| 329 |
+
query = query.order("is_featured", desc=True).order("price").limit(5)
|
| 330 |
|
| 331 |
# f. Execute and return
|
| 332 |
resp = query.execute()
|