dev add check for change status
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-27 17:56:28 +07:00
parent 67e547e185
commit d1b695a65b
2 changed files with 2 additions and 2 deletions
@@ -44,5 +44,5 @@ public interface LawCaseRepository extends JpaRepository<LawCase, Long> {
@Query("SELECT COUNT(lc.id) FROM LawCase lc")
Long getTotalLawCasesCount();
Optional<LawCase> getLawCaseByViolationIdAndType(Long violationId, String lawCaseType);
Optional<LawCase> getLawCaseByViolationIdAndType(Long violationId, LawCaseType type);
}
@@ -72,7 +72,7 @@ public class LawCaseService {
public LawCase fetchByViolationId(Long violationId) {
Optional<LawCase> lawCaseByViolationIdAndType =
lawCaseRepository.getLawCaseByViolationIdAndType(violationId, LawCaseType.ACTIVE.getName());
lawCaseRepository.getLawCaseByViolationIdAndType(violationId, LawCaseType.ACTIVE);
return lawCaseByViolationIdAndType.orElse(null);
}