#NEWLINE# def post( self , build_id ) : #NEWLINE# #INDENT# ' Set tags associated with a build. ' #NEWLINE# args = self . post_parser . parse_args ( ) #NEWLINE# if ( args . tags and ( not all ( ( ( len ( tag ) <= 16 ) for tag in args . tags ) ) ) ) : #NEWLINE# #INDENT# return error ( 'Tags must be 16 characters or less.' ) #NEWLINE# #UNINDENT# build = Build . query . get ( args ) #NEWLINE# if ( build is None ) : #NEWLINE# #INDENT# return self . respond ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , status_code = 404 ) #NEWLINE# #UNINDENT# build . tags = args . tags #NEWLINE# db . session . add ( build ) #NEWLINE# db . session . commit ( ) #NEWLINE# return self . respond ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )