Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 6ace420

Browse files
1 parent 756b261 commit 6ace420

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/utils/jurisdiction/ContactJurisdictionHelper.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ public static boolean isInJurisdiction(
3939
case NATION:
4040
return true;
4141
case REGION:
42-
return contactJurisdiction.getRegionUuid() != null
43-
&& DataHelper.equal(contactJurisdiction.getRegionUuid(), userJurisdiction.getRegionUuid());
42+
if (contactJurisdiction.getRegionUuid() != null) {
43+
return DataHelper.equal(contactJurisdiction.getRegionUuid(), userJurisdiction.getRegionUuid());
44+
}
45+
break;
4446
case DISTRICT:
45-
return contactJurisdiction.getDistrictUuid() != null
46-
&& DataHelper.equal(contactJurisdiction.getDistrictUuid(), userJurisdiction.getDistrictUuid());
47+
if (contactJurisdiction.getDistrictUuid() != null) {
48+
return DataHelper.equal(contactJurisdiction.getDistrictUuid(), userJurisdiction.getDistrictUuid());
49+
}
50+
break;
4751
case COMMUNITY:
4852
return false;
4953
case HEALTH_FACILITY:

0 commit comments

Comments
 (0)