ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

bugfixes in combine_expression #51

Closed jstenz closed 3 years ago

jstenz commented 4 years ago

Don't replace '+' with '-' in sub_expression of 'else' branch as it cause wrong result in operation such as "a / (b + c)". The fact it's identical to branch " operator == '-' " lead me to think it's a duplication error. Additionally, i don't have a django 1.x handy to test but i think "sub_expressions[1] = str.replace('+', '-')" don't work ? It appear to be an artifact of a previous commit when the variable "str" existed and is also redundant with the first branch.

bimalkjha commented 3 years ago

@jstenz We tested the latest code with django 3.1 and all tests works fine. Please mention which bug is being fixed by this change or what kind of this change is?

bimalkjha commented 3 years ago

Closing the pull request as all tests of django 3.x is working with current master. Feel free to open new pull request with details. Thanks.