#NEWLINE# def post( self , alert_id ) : #NEWLINE# #INDENT# req = request . get_json ( True ) #NEWLINE# params = project ( req , ( 'options' , 'name' , 'query_id' , 'rearm' ) ) #NEWLINE# alert = get_object_or_404 ( models . Alert . get_by_id_and_org , alert_id , self . current_org ) #NEWLINE# require_admin_or_owner ( alert . user . id ) #NEWLINE# if ( 'query_id' in params ) : #NEWLINE# #INDENT# params [ 'query' ] = params . pop ( 'query_id' ) #NEWLINE# #UNINDENT# alert . update_instance ( ** params ) #NEWLINE# self . record_event ( { #NEWLINE# #INDENT# 'action' : 'edit' , #NEWLINE# 'timestamp' : int ( time . time ( ) ) , #NEWLINE# 'object_id' : alert . id , #NEWLINE# 'object_type' : 'alert' , #NEWLINE# #UNINDENT# } ) #NEWLINE# return alert . to_dict ( )