SORMAS-Project icon indicating copy to clipboard operation
SORMAS-Project copied to clipboard

[Dashboard] Error message displayed on the 'Dashboard' when logging in with a user limited by a disabled disease

Open adinaflorea9 opened this issue 2 years ago • 0 comments

Bug Description

An error message is displayed on the dashboard, as it seems to not be able to deal with not displaying any disease at all. The behavior is reproducible when being logged in the app with a user limited by a disease which has been disabled from the DB.

Steps to Reproduce

  1. From the Data Base, in the 'diseaseconfiguration' table, for the disease 'Malaria' set the following save the changes and restart the server afterwards:
  • 'primarydisease' = true;
  • 'casesurveillanceenabled' = true;
  • 'aggregatereportingenabled' = true;
  1. In the vaadin-app, create a new user (with user roles of admin + national user) and set for it the 'Limited disease' = Malaria;
  2. Create some entities with the disease 'Malaria' (case, contact, event, aggregated report);
  3. Navigate to the DB and set to false all the values that were set to true at step 1;
  4. Save the changes and restart the server;
  5. Log into the vaadin-app with the user created at step 2.

Actual Behavior

On the 'Dashboard' an error message is displayed: image

In the server logs the following error is displayed: image

Expected Behavior

No error should be displayed in either the UI or the server logs when no disease is displayed on the dashboard.

Screenshots

System Details

  • Device: Windows 10
  • SORMAS version: 1.75.0-SNAPSHOT(b7ef39c)
  • Android version/Browser: Chrome
  • Server URL: local machine
  • User Role: Admin+NatUser limited by a disease

Additional Information

Logs from the local machine: error after login.txt

adinaflorea9 avatar Aug 10 '22 07:08 adinaflorea9