'Helper class method to create a new Survey Form.
update_if_exists=True means that if a form already exists with that name, then update it.
Otherwise throw an SurveyFormAlreadyExists exception'

@classmethod
def create(cls, name, form, update_if_exists=False):

    survey = cls.get(name, throw_if_not_found=False)
    if (not survey):
        survey = SurveyForm(name=name, form=form)
    elif update_if_exists:
        survey.form = form
    else:
        raise SurveyFormNameAlreadyExists()
    survey.save()
    return survey
