#NEWLINE# def delete_state( self , request_dict ) : #NEWLINE# #INDENT# state_id = request_dict [ 'params' ] . get ( 'stateId' , None ) #NEWLINE# activity_id = request_dict [ 'params' ] [ 'activityId' ] #NEWLINE# registration = request_dict [ 'params' ] . get ( 'registration' , None ) #NEWLINE# try : #NEWLINE# #INDENT# if ( not self ) : #NEWLINE# #INDENT# states = self . get_state_set ( activity_id , registration , None ) #NEWLINE# for s in states : #NEWLINE# #INDENT# s . delete ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . get_state ( activity_id , registration , state_id ) . delete ( ) #NEWLINE# #UNINDENT# #UNINDENT# except ActivityState . DoesNotExist : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# except IDNotFoundError : #NEWLINE# #INDENT# pass