fix(instructions): link sets with alphanumeric ids (#166)
This commit is contained in:
@@ -75,10 +75,11 @@ class BrickInstructions(object):
|
|||||||
|
|
||||||
splits = normalized.split('-', 2)
|
splits = normalized.split('-', 2)
|
||||||
|
|
||||||
if len(splits) >= 2:
|
if len(splits) >= 2 and splits[0]:
|
||||||
try:
|
try:
|
||||||
# Trying to make sense of each part as integers
|
# The set number can be alphanumeric (e.g. Pick-a-Brick
|
||||||
int(splits[0])
|
# builds like "EG00029-1"); only the version suffix has
|
||||||
|
# to be an integer
|
||||||
int(splits[1])
|
int(splits[1])
|
||||||
|
|
||||||
self.set = '-'.join(splits[:2])
|
self.set = '-'.join(splits[:2])
|
||||||
|
|||||||
Reference in New Issue
Block a user