database/survey_models.py
def create_with_settings(cls, survey_type: str, **kwargs):
        """
        Create a new Survey with the provided survey type and attached to the given Study,
        as well as any other given keyword arguments. If the Survey is audio/image and no other
        settings are given, give it the default audio/image survey settings.
        """

        if survey_type == cls.AUDIO_SURVEY and 'settings' not in kwargs:
            kwargs['settings'] = json.dumps(AUDIO_SURVEY_SETTINGS)
        elif survey_type == cls.IMAGE_SURVEY and 'settings' not in kwargs:
            kwargs['settings'] = json.dumps(IMAGE_SURVEY_SETTINGS)

        survey = cls.create_with_object_id(survey_type=survey_type, **kwargs)
        return survey

        Create a new Survey with the provided survey type and attached to the given Study,
        as well as any other given keyword arguments. If the Survey is audio/image and no other
        settings are given, give it the default audio/image survey settings.
        
Create a new Survey with the provided survey type and attached to the given Study,
as well as any other given keyword arguments. If the Survey is audio/image and no other
settings are given, give it the default audio/image survey settings.
Create a new Survey with the provided survey type and attached to the given Study as well as any other given keyword arguments . If the Survey is audio / image and no other settings are given give it the default audio / image survey settings .
def create_with_settings(cls, survey_type: str, **kwargs):
        if survey_type == cls.AUDIO_SURVEY and 'settings' not in kwargs:
            kwargs['settings'] = json.dumps(AUDIO_SURVEY_SETTINGS)
        elif survey_type == cls.IMAGE_SURVEY and 'settings' not in kwargs:
            kwargs['settings'] = json.dumps(IMAGE_SURVEY_SETTINGS)
        survey = cls.create_with_object_id(survey_type=survey_type, **kwargs)
        return survey
def create_with_settings ( cls , survey_type : str , ** kwargs ) : if survey_type == cls . AUDIO_SURVEY and 'settings' not in kwargs : kwargs [ 'settings' ] = json . dumps ( AUDIO_SURVEY_SETTINGS ) elif survey_type == cls . IMAGE_SURVEY and 'settings' not in kwargs : kwargs [ 'settings' ] = json . dumps ( IMAGE_SURVEY_SETTINGS ) survey = cls . create_with_object_id ( survey_type = survey_type , ** kwargs ) return survey
Create a new Survey with the provided survey type and attached to the given Study,
as well as any other given keyword arguments.
Create a new Survey with the provided survey type and attached to the given Study as well as any other given keyword arguments .
"""
        Create a new Survey with the provided survey type and attached to the given Study,
        as well as any other given keyword arguments. If the Survey is audio/image and no other
        settings are given, give it the default audio/image survey settings.
        """
cls
survey_type
str