Skip to content

Commit

Permalink
#678 - improved message
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed Jan 6, 2024
1 parent 05240a4 commit cc839e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ default void updateConceptSyncAttributesForSubjectType(Long subjectTypeId, Strin
default EntityApprovalStatus saveEAS(EntityApprovalStatus entityToSave) {
EntityApprovalStatus latestEAS = this.findFirstByEntityIdAndEntityTypeAndIsVoidedFalseOrderByStatusDateTimeDesc(entityToSave.getEntityId(), entityToSave.getEntityType());
if (latestEAS != null && latestEAS.getApprovalStatus().getStatus().equals(entityToSave.getApprovalStatus().getStatus()))
throw new RuntimeException(String.format("The latest approval for this entity has the same latest status. %s %s", entityToSave.getEntityType(), entityToSave.getEntityId()));
throw new RuntimeException(String.format("The latest approval for this entity has the same latest status. %s %s %s", entityToSave.getEntityType(), entityToSave.getEntityId(), entityToSave.getApprovalStatus().getStatus()));
return this.save(entityToSave);
}
}

0 comments on commit cc839e7

Please sign in to comment.