ucam-department-of-psychiatry / camcops

Cambridge Cognitive and Psychiatric Test Kit (CamCOPS)
Other
12 stars 8 forks source link

Fix server-version mismatch in single user mode #317

Closed martinburchell closed 10 months ago

martinburchell commented 11 months ago

When uploading in single user mode, if the server version has changed, store the new version in the client database and re-fetch the strings. Previously the user would see a generic error message and the only way to fix it was to re-register the patient.

Fixes #263

I'm rather lazily storing the server version on the client and pushing the upload state back so that the server details are fetched again unnecessarily, with a small performance overhead. The alternative is to maintain a longer alternative sequence of states for this scenario, making the code a bit more complicated to follow.