3ae77833389609a2c958c745e47086ece9efef73,modules/s3/s3gis.py,GIS,set_config,#Any#Any#,1265

Before Change


                                    left=left,
                                    orderby=ctable.pe_type,
                                    limitby=(0, 2))
            if len(rows) == 1:
                // The requested config must be invalid, so just use site default
                row = rows.first()

        elif config_id == 0:
            // Use site default
            query = (ctable.uuid == "SITE_DEFAULT")
            // May well not be complete, so Left Join

After Change


        row = None
        rows = None
        if config_id:
            row = db(ctable.id == config_id).select(ctable.merge,
                                                    limitby= (0, 1)
                                                    ).first()
            if row:
                // May well not be complete, so Left Join
                left = (ptable.on(ptable.id == ctable.projection_id),
                        stable.on((stable.config_id == ctable.id) & \
                                  (stable.layer_id == None)),
                        mtable.on(mtable.id == stable.marker_id),
                        )
                if row.merge:
                    // Merge this one with the Site Default
                    query = (ctable.id == config_id) | \
                            (ctable.uuid == "SITE_DEFAULT")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


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: 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: f5192961fe68965d938776c4690a892a9b065e78
Time: 2019-08-07
Author: fran@aidiq.com
File Name: modules/templates/UCCE/controllers.py
Class Name: dc_TemplateEditor
Method Name: apply_method