Skip to content

Commit

Permalink
MODSOURCE-773: Condition improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
VRohach committed Jun 5, 2024
1 parent 2779869 commit 53906a5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,11 @@ public static Condition filterRecordByUpdatedDateRange(Date updatedAfter, Date u
* @return condition
*/
public static Condition filterRecordByDeleted(Boolean deleted) {
Condition condition = filterRecordByState(RecordState.ACTUAL.name());
if (deleted == null) {
return null;
condition = condition.or(filterRecordByState(RecordState.DELETED.name()))
.or(filterRecordByState(RecordState.ACTUAL.name()));
}
Condition condition = filterRecordByState(RecordState.ACTUAL.name());
if (Boolean.TRUE.equals(deleted)) {
condition = condition.or(filterRecordByState(RecordState.DELETED.name()))
.or(filterRecordByState(RecordState.ACTUAL.name()).and(filterRecordByLeaderRecordStatus(DELETED_LEADER_RECORD_STATUS)));
Expand Down

0 comments on commit 53906a5

Please sign in to comment.