Skip to content

Commit

Permalink
null pointer exceptions fixed for proposedBy
Browse files Browse the repository at this point in the history
  • Loading branch information
ahakanzn committed Oct 8, 2024
1 parent f7ca8a1 commit 23cbee5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void updateChangeSuggestion(R updatedChangeSuggestion) {
.forEach(c -> c.setOverwritten(true));
dto.getChanges().add(newChange);
}
if (updatedChangeSuggestion.getSuggestedEntity() instanceof Collection && updatedChangeSuggestion.getProposedBy().equals(IH_SYNC_USER)) {
if (updatedChangeSuggestion.getSuggestedEntity() instanceof Collection && IH_SYNC_USER.equals(updatedChangeSuggestion.getProposedBy())) {
Collection collection = (Collection) updatedChangeSuggestion.getSuggestedEntity();
if (collection.getInstitutionKey() != null) {
dto.setCreateInstitution(false);
Expand Down Expand Up @@ -868,7 +868,7 @@ private boolean isEmptyAddress(Address address) {
private void lockFields(R entityOld, R entityNew) {
List<MasterSourceUtils.LockableField> fieldsToLock;
if (entityOld instanceof CollectionChangeSuggestion
&& Objects.equals(entityOld.getProposedBy(), IH_SYNC_USER)) {
&& IH_SYNC_USER.equals(entityOld.getProposedBy())) {
fieldsToLock = COLLECTION_LOCKABLE_FIELDS.get(MasterSourceType.IH);
fieldsToLock.forEach(
f -> {
Expand Down

0 comments on commit 23cbee5

Please sign in to comment.