We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43bee7c commit e5cc263Copy full SHA for e5cc263
1 file changed
app/src/main/java/org/openimis/imispolicies/usecase/Login.java
@@ -53,10 +53,10 @@ public Login(
53
54
@WorkerThread
55
public void execute(@NonNull String username, @NonNull String password) throws Exception {
56
- String officerCode = (Global.getGlobal().getOfficerCode() != null)
57
- ? Global.getGlobal().getOfficerCode()
58
- : username;
59
-
+ if (Global.getGlobal().getOfficerCode() == null) {
+ Global.getGlobal().setOfficerCode(username);
+ }
+ String officerCode = Global.getGlobal().getOfficerCode();
60
if (officerCode == null) {
61
throw new IllegalStateException("OfficerCode should not be null on login");
62
}
0 commit comments