Skip to content

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

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.

def qhawaxQueryUpdateFilterByQhawaxName(json, qhawax_name):
    if(qhawaxExistBasedOnName(qhawax_name)):
        session.query(Qhawax).filter_by(name=qhawax_name).update(values=json)
        session.commit()

def qhawaxQueryUpdateFilterByQhawaxId(json, qhawax_id):
    if(qhawaxExistBasedOnID(qhawax_id)):
        session.query(Qhawax).filter_by(id=qhawax_id).update(values=json)
        session.commit()

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