mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	Fix matching if user supplied an empty value
This commit is contained in:
		
							parent
							
								
									aea4af5d3b
								
							
						
					
					
						commit
						7b227ffa2f
					
				@ -86,6 +86,9 @@ class Tag(SluggedModel):
 | 
				
			|||||||
            self.name, self.match, self.get_matching_algorithm_display())
 | 
					            self.name, self.match, self.get_matching_algorithm_display())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def matches(self, text):
 | 
					    def matches(self, text):
 | 
				
			||||||
 | 
					        # Check that match is not empty
 | 
				
			||||||
 | 
					        if self.match.strip() == "":
 | 
				
			||||||
 | 
					            return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if self.matching_algorithm == self.MATCH_ALL:
 | 
					        if self.matching_algorithm == self.MATCH_ALL:
 | 
				
			||||||
            for word in self.match.split(" "):
 | 
					            for word in self.match.split(" "):
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user