wagtail-localize icon indicating copy to clipboard operation
wagtail-localize copied to clipboard

Fix getting progress when there are no strings

Open alexkiro opened this issue 1 year ago • 1 comments

Unlike COUNT, SUM will actually return NULL not 0 when there are no rows, so we need to coalesce to 0 to avoid such cases.

This issued caused both the progress and status values to be incorrect for translations. Since 0 != None an empty page will have its translations marked as "waiting for translations."

alexkiro avatar Oct 09 '24 06:10 alexkiro

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.07%. Comparing base (caf14b8) to head (7c99102).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #829   +/-   ##
=======================================
  Coverage   93.07%   93.07%           
=======================================
  Files          47       47           
  Lines        4144     4145    +1     
  Branches      704      704           
=======================================
+ Hits         3857     3858    +1     
  Misses        173      173           
  Partials      114      114           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 09 '24 08:10 codecov-commenter

Thank you @alexkiro

zerolab avatar Dec 20 '24 09:12 zerolab