mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Last time fixing the toggling logic, I hope =/
This commit is contained in:
		@@ -108,9 +108,9 @@ export class FilterEditorViewService {
 | 
			
		||||
 | 
			
		||||
    if (existingRules && existingItemRule) {
 | 
			
		||||
      filterRules.splice(filterRules.indexOf(existingItemRule), 1) // if exact rule exists just remove
 | 
			
		||||
    } else if (existingItemRule && filterRuleType.multi) { // e.g. tags can have multiple
 | 
			
		||||
    } else if (existingRules.length > 0 && filterRuleType.multi) { // e.g. tags can have multiple
 | 
			
		||||
      filterRules.push({type: filterRuleType, value: item.id})
 | 
			
		||||
    } else if (existingRules.length) { // Correspondents & DocumentTypes only one
 | 
			
		||||
    } else if (existingRules.length > 0) { // Correspondents & DocumentTypes only one
 | 
			
		||||
      filterRules.find(rule => rule.type.id == filterRuleType.id).value = item.id
 | 
			
		||||
    } else {
 | 
			
		||||
      filterRules.push({type: filterRuleType, value: item.id})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user