Skip to content

Commit f20f060

Browse files
authored
remove altering row count in search query (#1787)
1 parent f9a3159 commit f20f060

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

api/namex/resources/requests.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -409,16 +409,6 @@ def get():
409409

410410
condition += f'({name_condition})'
411411

412-
# Check if the NR number is less than 7 digits. If so, patch it with zero at the end to increase rows number.
413-
# Otherwise, the rows is too small and it will take long time to search in solr and get timeout exception.
414-
# So the less of nr_number, the bigger of rows will be.
415-
temp_rows = str(rows)
416-
417-
if (nr_number and len(nr_number) < 7):
418-
temp_rows = str(rows).ljust(9-len(nr_number), '0')
419-
rows = int(temp_rows)
420-
current_app.logger.info('final rows is: {}'.format(rows))
421-
422412
results = RequestDAO.query.filter(
423413
RequestDAO.stateCd.in_([State.DRAFT, State.INPROGRESS, State.REFUND_REQUESTED]),
424414
text(f'({condition})')

0 commit comments

Comments
 (0)