Skip to content

Commit 4f427ba

Browse files
authored
Merge pull request openimis#218 from Y-Note-SAS/feature-34407
fix officerCode is null on login
2 parents 5a53e65 + e5cc263 commit 4f427ba

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public Login(
5353

5454
@WorkerThread
5555
public void execute(@NonNull String username, @NonNull String password) throws Exception {
56+
if (Global.getGlobal().getOfficerCode() == null) {
57+
Global.getGlobal().setOfficerCode(username);
58+
}
5659
String officerCode = Global.getGlobal().getOfficerCode();
5760
if (officerCode == null) {
5861
throw new IllegalStateException("OfficerCode should not be null on login");

0 commit comments

Comments
 (0)