cleanup indentation and remove a conditional
since 3 elements of `tagged_image` is valid,
we should not throw an error if `len > 2`
@@ -17,11 +17,9 @@ from polyaxon_schemas.base import BaseConfig
def validate_image(image):
if not image:
raise ValidationError('Invalid docker image `{}`'.format(image))
- tagged_image = image.rsplit(':')
+ tagged_image = image.split(':')
if len(tagged_image) > 3:
raise ValidationError('Invalid docker image `{}`'.format(image))
- if len(tagged_image) > 2:
- raise ValidationError('Invalid docker image `{}`'.format(image))
class BuildSchema(Schema):
