Skip to content

Commit e5cc263

Browse files
committed
corrections
1 parent 43bee7c commit e5cc263

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • app/src/main/java/org/openimis/imispolicies/usecase

app/src/main/java/org/openimis/imispolicies/usecase/Login.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public Login(
5353

5454
@WorkerThread
5555
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-
56+
if (Global.getGlobal().getOfficerCode() == null) {
57+
Global.getGlobal().setOfficerCode(username);
58+
}
59+
String officerCode = Global.getGlobal().getOfficerCode();
6060
if (officerCode == null) {
6161
throw new IllegalStateException("OfficerCode should not be null on login");
6262
}

0 commit comments

Comments
 (0)