mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	No need for a branch here, the loop takes care of it
This commit is contained in:
		
				
					committed by
					
						
						Johann Bauer
					
				
			
			
				
	
			
			
			
						parent
						
							6bd585a9a0
						
					
				
				
					commit
					64be6dcb36
				
			@@ -106,17 +106,16 @@ class DocumentClassifier:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            # Check for the warning about unpickling from differing versions
 | 
					            # Check for the warning about unpickling from differing versions
 | 
				
			||||||
            # and consider it incompatible
 | 
					            # and consider it incompatible
 | 
				
			||||||
            if len(w) > 0:
 | 
					            sk_learn_warning_url = (
 | 
				
			||||||
                sk_learn_warning_url = (
 | 
					                "https://scikit-learn.org/stable/"
 | 
				
			||||||
                    "https://scikit-learn.org/stable/"
 | 
					                "model_persistence.html"
 | 
				
			||||||
                    "model_persistence.html"
 | 
					                "#security-maintainability-limitations"
 | 
				
			||||||
                    "#security-maintainability-limitations"
 | 
					            )
 | 
				
			||||||
                )
 | 
					            for warning in w:
 | 
				
			||||||
                for warning in w:
 | 
					                if issubclass(warning.category, UserWarning):
 | 
				
			||||||
                    if issubclass(warning.category, UserWarning):
 | 
					                    w_msg = str(warning.message)
 | 
				
			||||||
                        w_msg = str(warning.message)
 | 
					                    if sk_learn_warning_url in w_msg:
 | 
				
			||||||
                        if sk_learn_warning_url in w_msg:
 | 
					                        raise IncompatibleClassifierVersionError()
 | 
				
			||||||
                            raise IncompatibleClassifierVersionError()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def save(self):
 | 
					    def save(self):
 | 
				
			||||||
        target_file = settings.MODEL_FILE
 | 
					        target_file = settings.MODEL_FILE
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user