mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-04 12:36:23 +00:00 
			
		
		
		
	solve the issue for mutually exclusive tags validation for PUT API (#11428)
* solve the issue for mutually exclusive tags validation for PUT API * checkstyle --------- Co-authored-by: Himank Mehta <himankmehta@Himanks-MacBook-Air.local>
This commit is contained in:
		
							parent
							
								
									2c9ba537eb
								
							
						
					
					
						commit
						9d61d63ce4
					
				@ -1453,14 +1453,15 @@ public abstract class EntityRepository<T extends EntityInterface> {
 | 
				
			|||||||
        return; // Nothing to update
 | 
					        return; // Nothing to update
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // Remove current entity tags in the database. It will be added back later from the merged tag list.
 | 
					 | 
				
			||||||
      daoCollection.tagUsageDAO().deleteTagsByTarget(fqn);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if (operation.isPut()) {
 | 
					      if (operation.isPut()) {
 | 
				
			||||||
        // PUT operation merges tags in the request with what already exists
 | 
					        // PUT operation merges tags in the request with what already exists
 | 
				
			||||||
        EntityUtil.mergeTags(updatedTags, origTags);
 | 
					        EntityUtil.mergeTags(updatedTags, origTags);
 | 
				
			||||||
 | 
					        checkMutuallyExclusive(updatedTags);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // Remove current entity tags in the database. It will be added back later from the merged tag list.
 | 
				
			||||||
 | 
					      daoCollection.tagUsageDAO().deleteTagsByTarget(fqn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      List<TagLabel> addedTags = new ArrayList<>();
 | 
					      List<TagLabel> addedTags = new ArrayList<>();
 | 
				
			||||||
      List<TagLabel> deletedTags = new ArrayList<>();
 | 
					      List<TagLabel> deletedTags = new ArrayList<>();
 | 
				
			||||||
      recordListChange(fieldName, origTags, updatedTags, addedTags, deletedTags, tagLabelMatch);
 | 
					      recordListChange(fieldName, origTags, updatedTags, addedTags, deletedTags, tagLabelMatch);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user