Prevent invalid tags on builds

Fixes #1632
This commit is contained in:
Joseph Schorr 2016-07-25 17:50:35 -07:00
parent 640012103c
commit 0fe3e6510a
5 changed files with 41 additions and 5 deletions

View file

@ -8,6 +8,7 @@ from data import model
from data.database import db
from auth.auth_context import get_authenticated_user
from endpoints.notificationhelper import spawn_notification
from util.names import escape_tag
logger = logging.getLogger(__name__)
@ -160,7 +161,7 @@ class PreparedBuild(object):
if self._tags:
raise Exception('Property tags already set')
self._tags = list(value)
self._tags = [escape_tag(tag, default='latest') for tag in value]
@property
def build_name(self):