Skip to content

Commit

Permalink
TRUNK-6003: Make getLocationsByTag method null safe (openmrs#3768)
Browse files Browse the repository at this point in the history
  • Loading branch information
cioan authored and ibacher committed May 5, 2021
1 parent a15fc5e commit 0e5e23f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public List<Location> getLocationsByTag(LocationTag tag) throws APIException {
List<Location> locations = new ArrayList<>();

for (Location l : dao.getAllLocations(false)) {
if (l.getTags().contains(tag)) {
if (l.getTags() != null && l.getTags().contains(tag)) {
locations.add(l);
}
}
Expand Down

0 comments on commit 0e5e23f

Please sign in to comment.