mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 18:48:35 +00:00 
			
		
		
		
	Minor : Fix enum cleanup not triggering when all enum keys are removed (#21258)
This commit is contained in:
		
							parent
							
								
									7a73598a93
								
							
						
					
					
						commit
						b61cdd940d
					
				| @ -443,7 +443,6 @@ public class TypeRepository extends EntityRepository<Type> { | |||||||
|       String fieldName = getCustomField(origProperty, "customPropertyConfig"); |       String fieldName = getCustomField(origProperty, "customPropertyConfig"); | ||||||
|       if (previous == null || !previous.getVersion().equals(updated.getVersion())) { |       if (previous == null || !previous.getVersion().equals(updated.getVersion())) { | ||||||
|         validatePropertyConfigUpdate(entity, origProperty, updatedProperty); |         validatePropertyConfigUpdate(entity, origProperty, updatedProperty); | ||||||
|       } |  | ||||||
|         if (recordChange( |         if (recordChange( | ||||||
|             fieldName, |             fieldName, | ||||||
|             origProperty.getCustomPropertyConfig(), |             origProperty.getCustomPropertyConfig(), | ||||||
| @ -469,6 +468,7 @@ public class TypeRepository extends EntityRepository<Type> { | |||||||
|           postUpdateCustomPropertyConfig(entity, origProperty, updatedProperty); |           postUpdateCustomPropertyConfig(entity, origProperty, updatedProperty); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     private void validatePropertyConfigUpdate( |     private void validatePropertyConfigUpdate( | ||||||
|         Type entity, CustomProperty origProperty, CustomProperty updatedProperty) { |         Type entity, CustomProperty origProperty, CustomProperty updatedProperty) { | ||||||
| @ -505,7 +505,7 @@ public class TypeRepository extends EntityRepository<Type> { | |||||||
|         HashSet<String> addedKeys = new HashSet<>(updatedKeys); |         HashSet<String> addedKeys = new HashSet<>(updatedKeys); | ||||||
|         addedKeys.removeAll(origKeys); |         addedKeys.removeAll(origKeys); | ||||||
| 
 | 
 | ||||||
|         if (!removedKeys.isEmpty() && addedKeys.isEmpty()) { |         if (!removedKeys.isEmpty()) { | ||||||
|           List<String> removedEnumKeys = new ArrayList<>(removedKeys); |           List<String> removedEnumKeys = new ArrayList<>(removedKeys); | ||||||
| 
 | 
 | ||||||
|           try { |           try { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 sonika-shah
						sonika-shah