def _create_models_for_thread_and_first_message(exploration_id, state_name, original_author_id, subject, text, has_suggestion):
 thread_id = feedback_models.FeedbackThreadModel.generate_new_thread_id(exploration_id)
 thread = feedback_models.FeedbackThreadModel.create(exploration_id, thread_id)
 thread.exploration_id = exploration_id
 thread.state_name = state_name
 thread.original_author_id = original_author_id
 thread.status = feedback_models.STATUS_CHOICES_OPEN
 thread.subject = subject
 thread.has_suggestion = has_suggestion
 thread.put()
 create_message(exploration_id, thread_id, original_author_id, feedback_models.STATUS_CHOICES_OPEN, subject, text)
 return thread_id

def _create_models_for_thread_and_first_message ( exploration_id , state_name , original_author_id , subject , text , has_suggestion ) : thread_id = feedback_models . FeedbackThreadModel . generate_new_thread_id ( exploration_id ) thread = feedback_models . FeedbackThreadModel . create ( exploration_id , thread_id ) thread . exploration_id = exploration_id thread . state_name = state_name thread . original_author_id = original_author_id thread . status = feedback_models . STATUS_CHOICES_OPEN thread . subject = subject thread . has_suggestion = has_suggestion thread . put ( ) create_message ( exploration_id , thread_id , original_author_id , feedback_models . STATUS_CHOICES_OPEN , subject , text ) return thread_id
creates a feedback thread and its first message .