Minor : Fix enum cleanup not triggering when all enum keys are removed (#21258)

This commit is contained in:
sonika-shah 2025-05-18 19:55:46 +05:30 committed by GitHub
parent 7a73598a93
commit b61cdd940d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -443,7 +443,6 @@ public class TypeRepository extends EntityRepository<Type> {
String fieldName = getCustomField(origProperty, "customPropertyConfig");
if (previous == null || !previous.getVersion().equals(updated.getVersion())) {
validatePropertyConfigUpdate(entity, origProperty, updatedProperty);
}
if (recordChange(
fieldName,
origProperty.getCustomPropertyConfig(),
@ -469,6 +468,7 @@ public class TypeRepository extends EntityRepository<Type> {
postUpdateCustomPropertyConfig(entity, origProperty, updatedProperty);
}
}
}
private void validatePropertyConfigUpdate(
Type entity, CustomProperty origProperty, CustomProperty updatedProperty) {
@ -505,7 +505,7 @@ public class TypeRepository extends EntityRepository<Type> {
HashSet<String> addedKeys = new HashSet<>(updatedKeys);
addedKeys.removeAll(origKeys);
if (!removedKeys.isEmpty() && addedKeys.isEmpty()) {
if (!removedKeys.isEmpty()) {
List<String> removedEnumKeys = new ArrayList<>(removedKeys);
try {