Make the check for Median annotation more robust

Issue #571 new
David Platten created an issue

It is possible for a user to setup OpenREM using PostgreSQL without carrying out the manual database migration that enables the database to calculate median values. As the code stands, if this happens OpenREM users are given the option of calculating median values for charts, but the calculations fail and the user is presented with blank charts without any explanation of what has happened.

If the installer follows the on-line instructions then this should not be an issue. However, it may be better to remove the possibility of blank charts appearing.

There's a variable called median_available that is currently set to true if the OpenREM install uses PostgreSQL. It is assumed that the user has carried out the manual database migration to enable the Median annotate function. If median_available is true then median and both appear as options for the chart average.

Setting median_available to true could be tightened to check for PostgreSQL and check for a working Median annotate function. I don't know how to elegantly do this at the moment though.

Comments (0)

  1. Log in to comment