Skip to content

Fix "similar-code" issue in project/main/same_function_helper.py #99

Description

@SabCampos

The same_function_helper.py file contains multiple functions that are reused all over the API.

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

The following blocks of code may be replaced with a function that can be called multiple times.

lines 70..72

      installation_id= session.query(QhawaxInstallationHistory.id).\
                                       filter_by(qhawax_id=qhawax_id).\
                                       filter(QhawaxInstallationHistory.end_date_zone == None). \

lines 77..79

      return session.query(QhawaxInstallationHistory.id).\
                             filter_by(qhawax_id=qhawax_id). \
                             filter(QhawaxInstallationHistory.end_date_zone == None). \

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