Skip to content

Commit

Permalink
Fix list of ranges
Browse files Browse the repository at this point in the history
AttributeError: 'list' object has no attribute 'is_empty'
  • Loading branch information
ddelange committed Dec 20, 2019
1 parent f9524f9 commit f34bb15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mixology/union.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def ranges(self):
def of(cls, *ranges):
flattened = []
for constraint in ranges:
if isinstance(constraint, list):
flattened.extend(constraint)

if constraint.is_empty():
continue

Expand Down

0 comments on commit f34bb15

Please sign in to comment.