Normalize the Gerrit URL in a cross-Django manner.

Review Request #10229 — Created Oct. 13, 2018 and updated

chipx86
Review Board
release-4.0.x
0aa82c2...
reviewboard

URLField on Django 1.6 will add a trailing / to a URL without an
explicit path, whereas newer versions will not. Since Gerrit goes out of
its way to check the resulting URLs from the field, we need consistency
across the versions. To be future-proof, we now strip the trailing /
when cleaning the form.

The relevant unit tests pass on Django 1.6 and 1.11.

Description From Last Updated

Typo: normalize -> normalized

daviddavid
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. 
      
  2. reviewboard/hostingsvcs/gerrit.py (Diff revision 1)
     
     

    Typo: normalize -> normalized

  3. 
      
Loading...