ef2c9d1e1c83223c279faa8e2b1fe2df5219c7f9,modules/s3db/dc.py,DataCollectionTemplateModel,dc_question_onaccept,#Any#,575

Before Change


            multiple = question_settings.get("multiple")
            if multiple > 1:
                field_type = "list:string"
                mobile_settings["requires"] = {"selectedOptions": [0, multiple]}
            else:
                field_type = "string"
            other = question_settings.get("other")

After Change


                    // Create the Dynamic Field
                    // Lookup the table_id
                    ttable = db.dc_template
                    template = db(ttable.id == question.template_id).select(ttable.table_id,
                                                                            limitby=(0, 1)
                                                                            ).first()
                    from uuid import uuid1
                    name = "f%s" % str(uuid1()).replace("-", "_")
                    field_id = current.s3db.s3_field.insert(table_id = template.table_id,
                                                            label = other,
                                                            name = name,
                                                            field_type = "text",
                                                            )
                    // @ToDo: Call onaccept if this starts doing anything other than just setting "master"
                    // @ToDo: Call set_record_owner() once we start restricting these
        elif field_type == 7:
            // "Date"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: sahana/eden
Commit Name: ef2c9d1e1c83223c279faa8e2b1fe2df5219c7f9
Time: 2019-08-18
Author: fran@aidiq.com
File Name: modules/s3db/dc.py
Class Name: DataCollectionTemplateModel
Method Name: dc_question_onaccept


Project Name: sahana/eden
Commit Name: ef2c9d1e1c83223c279faa8e2b1fe2df5219c7f9
Time: 2019-08-18
Author: fran@aidiq.com
File Name: modules/s3db/dc.py
Class Name: DataCollectionTemplateModel
Method Name: dc_question_onaccept


Project Name: sahana/eden
Commit Name: 3ae77833389609a2c958c745e47086ece9efef73
Time: 2020-03-30
Author: fran@aidiq.com
File Name: modules/s3/s3gis.py
Class Name: GIS
Method Name: set_config


Project Name: sahana/eden
Commit Name: eb0bd3ee1c1822d7ee5a7a48f284ad22e8a9a9f2
Time: 2020-03-20
Author: fran@aidiq.com
File Name: modules/templates/CCC/controllers.py
Class Name:
Method Name: auth_user_register_onaccept