Commit 8a163a80 authored by Jérome Perrin's avatar Jérome Perrin

Fix configurator error in progress report page

progress report shows an error like this:

![progress report page showing error 500](/uploads/6857ba9d8405d1bbba35b0857bc765d8/Screenshot_2020-04-17_at_18.04.03.png)

See merge request !1103
parents b86b5e97 bc7f212d
...@@ -13,7 +13,10 @@ is_bt5_installation_running = installation_status['bt5']['all']!=0 and \ ...@@ -13,7 +13,10 @@ is_bt5_installation_running = installation_status['bt5']['all']!=0 and \
if not is_bt5_building_running: if not is_bt5_building_running:
all_bt5s = float(installation_status['bt5']['all']) all_bt5s = float(installation_status['bt5']['all'])
current_bt5s = float(installation_status['bt5']['current']) current_bt5s = float(installation_status['bt5']['current'])
if all_bt5s:
bt5_percent_of_total = current_bt5s / all_bt5s bt5_percent_of_total = current_bt5s / all_bt5s
else:
bt5_percent_of_total = 1
calc_percentage = calc_percentage + building_bt5_part_percentage + \ calc_percentage = calc_percentage + building_bt5_part_percentage + \
bt5_percent_of_total*installation_bt5_part_percentage bt5_percent_of_total*installation_bt5_part_percentage
......
...@@ -5,8 +5,14 @@ message_list = ["Configuration is over. Enjoy your new ERP5 system!", ...@@ -5,8 +5,14 @@ message_list = ["Configuration is over. Enjoy your new ERP5 system!",
"You will be redirected to a form in which you can login using", "You will be redirected to a form in which you can login using",
"one of yours newly created ERP5 user accounts."] "one of yours newly created ERP5 user accounts."]
portal.REQUEST.RESPONSE.setHeader('content-type', 'text/plain')
for message in message_list: for message in message_list:
if not message in html_status_report: if not message in html_status_report:
return 'False' print "Error: {message} not found in status report".format(message=message)
for log in portal.error_log.getLogEntries():
print "Error: {type} {value} {tb_text}".format(**log)
if str(printed):
return printed
return 'True' return 'True'
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment