Skip to content

Commit a65cae3

Browse files
committed
Do not remove user role audits for 0 conf
1 parent 31a2462 commit a65cae3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/main/java/invite/cron/ResourceCleaner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ private List<UserRole> cleanUserRoles() {
125125
}
126126

127127
private int cleanUserRoleAudit() {
128+
if (purgeAuditLogDays == 0L) {
129+
return 0;
130+
}
128131
Instant past = Instant.now().minus(Period.ofDays(purgeAuditLogDays));
129132
return userRoleAuditRepository.deleteByCreatedAtBefore(past);
130133
}

0 commit comments

Comments
 (0)