Skip to content

Fix "similar-code" issue in project/main/data/get_data_helper.py #106

Description

@SabCampos

The file get_data_helper.py contains functions that query the DB for registries that were previously stored. It should not have any function that updates or inserts registers any sort of information.

CodeClimate has found the following issue:
Similar blocks of code found in 2 locations. Consider refactoring.

Block 1, lines 15...18:

              qhawax_list = session.query(*columns_qhawax).\
                                    join(Qhawax, QhawaxInstallationHistory.qhawax_id == Qhawax.id). \
                                    join(EcaNoise, QhawaxInstallationHistory.eca_noise_id == EcaNoise.id). \
                                    group_by(Qhawax.id, QhawaxInstallationHistory.id,EcaNoise.id). \

Block 2, lines 26...29:

              qhawax_public = session.query(*columns_qhawax).\
                                      join(EcaNoise, QhawaxInstallationHistory.eca_noise_id == EcaNoise.id). \
                                      join(Qhawax, QhawaxInstallationHistory.qhawax_id == Qhawax.id). \
                                      group_by(Qhawax.id, QhawaxInstallationHistory.id,EcaNoise.id). \

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions