Skip to content

Commit 67262c5

Browse files
committed
done with searching
1 parent 625fc64 commit 67262c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ def add():
7676
@app.route('/results', methods=['GET'])
7777
@app.route('/results/<int:page>', methods=['GET'])
7878
def results(page=1):
79-
min_side = min(session['width'], session['height'])
80-
max_side = max(session['width'], session['height'])
8179
filter_conditions = [
8280
Segment.active.isnot(session['removed']),
83-
or_(and_(Segment.width >= min_side, Segment.height >= max_side),
84-
and_(Segment.height >= min_side, Segment.width >= max_side))]
81+
or_(and_(Segment.width >= session['width'],
82+
Segment.height >= session['height']),
83+
and_(Segment.height >= session['width'],
84+
Segment.width >= session['height']))]
8585
if session['removed']:
8686
filter_conditions.append(
8787
Segment.order_number.like(session['order_number']))

0 commit comments

Comments
 (0)