Page MenuHomeSoftware Heritage

common/utils: Fix zero query parameter handling in reverse
ClosedPublic

Authored by anlambert on Sep 15 2020, 5:34 PM.

Details

Summary

If a provided query parameter was equal to the zero int value, it was
discarded when generating an URL using our custom Django reverse wrapper.

Also add missing tests for the custom Django reverse wrapper.

Diff Detail

Repository
rDWAPPS Web applications
Branch
reverse-zero-query-param-fix
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15136
Build 23335: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 23334: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3955 (id=13913)

Rebasing onto 37cd0a8bce...

Current branch diff-target is up to date.
Changes applied before test
commit 992f1c0d2cce5ac85eed8f85cfeddfca92ddad41
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Sep 15 17:30:46 2020 +0200

    common/utils: Fix zero query parameter handling in reverse
    
    If a provided query parameter was equal to the zero int value, it was
    discarded when generating an URL using our custom Django reverse wrapper.
    
    Also add missing tests for the custom Django reverse wrapper.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/366/ for more details.

This revision is now accepted and ready to land.Sep 16 2020, 9:22 AM

Build is green

Patch application report for D3955 (id=13942)

Rebasing onto 24950a876c...

Current branch diff-target is up to date.
Changes applied before test
commit 185c2d3a4a2d5a08495ac1ac886e50153970c4e3
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Sep 15 17:30:46 2020 +0200

    common/utils: Fix zero query parameter handling in reverse
    
    If a provided query parameter was equal to the zero int value, it was
    discarded when generating an URL using our custom Django reverse wrapper.
    
    Also add missing tests for the custom Django reverse wrapper.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/370/ for more details.