Handle duplicate cardId on revoke
Some checks failed
build-and-deploy / build-deploy (push) Has been cancelled

This commit is contained in:
androidlover5842
2026-01-28 18:20:49 +05:30
parent 8c69a18e75
commit f082328abe
2 changed files with 3 additions and 1 deletions

View File

@@ -249,7 +249,8 @@ class IssuedCards(
return if (uuid != null) {
issuedCardRepo.findByIdAndPropertyId(uuid, propertyId)
} else {
issuedCardRepo.findByCardIdIgnoreCaseAndPropertyId(trimmed, propertyId)
issuedCardRepo.findAllByCardIdIgnoreCaseAndPropertyId(trimmed, propertyId)
.maxByOrNull { it.issuedAt }
}
}