mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-21 07:51:46 +02:00
Merge pull request #220 from erijo/issue-218
Handle invalid user being selected in config
This commit is contained in:
@@ -183,6 +183,10 @@ public class OpenScale {
|
|||||||
final int selectedUserId = getSelectedScaleUserId();
|
final int selectedUserId = getSelectedScaleUserId();
|
||||||
if (selectedUserId != -1) {
|
if (selectedUserId != -1) {
|
||||||
selectedScaleUser = userDAO.get(selectedUserId);
|
selectedScaleUser = userDAO.get(selectedUserId);
|
||||||
|
if (selectedScaleUser == null) {
|
||||||
|
selectScaleUser(-1);
|
||||||
|
throw new Exception("could not find the selected user");
|
||||||
|
}
|
||||||
return selectedScaleUser;
|
return selectedScaleUser;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Reference in New Issue
Block a user