def _make_history(self, questionnaire, concepts, questions):
    history = QuestionnaireHistory()
    history.fromdict(questionnaire.asdict(), allow_pk=True)
    for concept in concepts:
        new_concept = QuestionnaireConcept()
        new_concept.fromdict(concept.asdict())
        new_concept.questionnaireId = questionnaire.questionnaireId
        new_concept.questionnaireVersion = questionnaire.version
        history.concepts.append(new_concept)
    for question in questions:
        new_question = QuestionnaireQuestion()
        new_question.fromdict(question.asdict())
        new_question.questionnaireId = questionnaire.questionnaireId
        new_question.questionnaireVersion = questionnaire.version
        history.questions.append(new_question)
    return history
def _make_history(self, questionnaire, concepts, questions):
    history = QuestionnaireHistory()
    history.fromdict(questionnaire.asdict(), allow_pk=True)
    for concept in concepts:
        new_concept = QuestionnaireConcept()
        new_concept.fromdict(concept.asdict())
        new_concept.questionnaireId = questionnaire.questionnaireId
        new_concept.questionnaireVersion = questionnaire.version
        history.concepts.append(new_concept)
    for question in questions:
        new_question = QuestionnaireQuestion()
        new_question.fromdict(question.asdict())
        new_question.questionnaireId = questionnaire.questionnaireId
        new_question.questionnaireVersion = questionnaire.version
        history.questions.append(new_question)
    return history