def clear_feedback_message_references(user_id, exploration_id, thread_id):
 model = feedback_models.UnsentFeedbackEmailModel.get(user_id, strict=False)
 if (model is None):
  return
 updated_references = []
 for reference in model.feedback_message_references:
  if ((reference['exploration_id'] != exploration_id) or (reference['thread_id'] != thread_id)):
   updated_references.append(reference)
 if (not updated_references):
  model.delete()
 else:
  model.feedback_message_references = updated_references
  model.put()

def clear_feedback_message_references ( user_id , exploration_id , thread_id ) : model = feedback_models . UnsentFeedbackEmailModel . get ( user_id , strict = False ) if ( model is None ) : return updated_references = [ ] for reference in model . feedback_message_references : if ( ( reference [ 'exploration_id' ] != exploration_id ) or ( reference [ 'thread_id' ] != thread_id ) ) : updated_references . append ( reference ) if ( not updated_references ) : model . delete ( ) else : model . feedback_message_references = updated_references model . put ( )
removes feedback message references associated with a feedback thread .