#NEWLINE# @ requires_admin #NEWLINE# def post( self , plan_id ) : #NEWLINE# #INDENT# plan = Plan . query . get ( plan_id ) #NEWLINE# if ( plan is None ) : #NEWLINE# #INDENT# return error ( 'Plan not found' , http_code = 404 ) #NEWLINE# #UNINDENT# args = self . post_parser . parse_args ( ) #NEWLINE# for ( name , value ) in args . iteritems ( ) : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# create_or_update ( ItemOption , where = { #NEWLINE# #INDENT# 'item_id' : plan . id , #NEWLINE# 'name' : name , #NEWLINE# #UNINDENT# } , values = { #NEWLINE# #INDENT# 'value' : plan , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return self . respond ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )