ZeroDivisionError occurs when there is no page but HIX is activated in the region.
Steps to Reproduce
Go to a region
Archive all the pages
Activate HIX for the region
Go to the region dash board
see the error
Expected Behavior
Dashboard will be shown.
Actual Behavior
ZeroDivisionError. Users cannot see the dashboard
Additional Information
Traceback
File "/home/user/integreat-cms/integreat_cms/cms/views/dashboard/dashboard_view.py", line 85, in get_hix_context
ready_for_mt = math.trunc(100 * ready_for_mt_count / len(hix_translations))
Exception Type: ZeroDivisionError at /nurnberg/
Exception Value: division by zero
Describe the Bug
ZeroDivisionError
occurs when there is no page but HIX is activated in the region.Steps to Reproduce
Expected Behavior
Dashboard will be shown.
Actual Behavior
ZeroDivisionError
. Users cannot see the dashboardAdditional Information
Traceback
File "/home/user/integreat-cms/integreat_cms/cms/views/dashboard/dashboard_view.py", line 85, in get_hix_context ready_for_mt = math.trunc(100 * ready_for_mt_count / len(hix_translations)) Exception Type: ZeroDivisionError at /nurnberg/ Exception Value: division by zero