This repository was archived by the owner on Oct 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ def listFeaturesQuery(
137
137
order = params .orderBy .value ,
138
138
limit = RESULTS_PER_PAGE_LIST ,
139
139
offset = params .page * RESULTS_PER_PAGE_LIST
140
- ) if params .page else ""
140
+ ) if params .page is not None else " LIMIT {limit} OFFSET {offset} "
141
141
).replace ("WHERE AND" , "WHERE" )
142
142
if asJson :
143
143
return listQueryToJSON (query , params )
Original file line number Diff line number Diff line change @@ -179,12 +179,12 @@ def listFeaturesQuery(
179
179
) if params .area else "" ,
180
180
tags = " AND (" + tagsQueryFilter (params .tags , table .value ) + ")" if params .tags else "" ,
181
181
status = " AND status = '{status}'" .format (status = params .status .value ) if (params .status ) else "" ,
182
- order = " ORDER BY {order} DESC LIMIT {limit} OFFSET {offset}"
182
+ order = " AND {order} IS NOT NULL ORDER BY {order} DESC LIMIT {limit} OFFSET {offset}"
183
183
.format (
184
184
order = orderBy .value ,
185
185
limit = RESULTS_PER_PAGE_LIST ,
186
186
offset = params .page * RESULTS_PER_PAGE_LIST
187
- )
187
+ ) if params . page is not None else " LIMIT {limit} OFFSET {offset}"
188
188
).replace ("WHERE AND" , "WHERE" )
189
189
if asJson :
190
190
return listQueryToJSON (query , params )
You can’t perform that action at this time.
0 commit comments