Skip to content

Commit

Permalink
zone picking: fix sort filter move lines
Browse files Browse the repository at this point in the history
Unable to compare `False` and strings.
  • Loading branch information
sebalix committed Aug 17, 2020
1 parent 264e209 commit 9a854c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shopfloor/services/zone_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ def _find_location_move_lines(
def _sort_key_move_lines(order):
"""Return a `(sort_keys_func, reverse)` tuple for move lines."""
if order == "priority":
return lambda line: line.move_id.priority, True
return lambda line: line.move_id.priority or "", True
elif order == "location":
return (
lambda line: (
line.location_id.shopfloor_picking_sequence,
line.location_id.shopfloor_picking_sequence or "",
line.location_id.name,
),
False,
Expand Down

0 comments on commit 9a854c9

Please sign in to comment.