Page MenuHomeSoftware Heritage

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

Authored by anlambert on Tue, Sep 15, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Tue, Sep 15, 5:34 PM

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.

vlorentz accepted this revision.Wed, Sep 16, 9:22 AM
This revision is now accepted and ready to land.Wed, Sep 16, 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.