HomePhabricator

Avoid division by zero in HTML templates when there are no uploads
f79fd1a25ee1Unpublished

Tags
None
Referenced Files
None
Subscribers
None

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

Avoid division by zero in HTML templates when there are no uploads

For every country for every competition, the tool computes
the file usage rate and the percentage of new users.

This is computed in the Jinja templates by dividing by the
upload count and the uploader count, which results in
a ZeroDivisionError when there have been no uploads yet.

Now, if the upload[er] count is zero, we do not compute
and return a percentage of zero directly.

Details

Provenance
Jean-FredAuthored on Sep 5 2016, 5:30 PM
Parents
R1969:f71efdcdc008: correção de bug em link
Branches
Unknown
Tags
Unknown
ChangeId
None