mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fixes is_relative_to not being availible for 3.8
This commit is contained in:
		 Trenton Holmes
					Trenton Holmes
				
			
				
					committed by
					
						 Trenton H
						Trenton H
					
				
			
			
				
	
			
			
			 Trenton H
						Trenton H
					
				
			
						parent
						
							3b5a7fbd65
						
					
				
				
					commit
					397179ebe9
				
			| @@ -117,9 +117,11 @@ def consume_file( | ||||
|                     # Move it to consume directory to be picked up | ||||
|                     # Otherwise, use the current parent to keep possible tags | ||||
|                     # from subdirectories | ||||
|                     if path.is_relative_to(settings.SCRATCH_DIR): | ||||
|                     try: | ||||
|                         # is_relative_to would be nicer, but new in 3.9 | ||||
|                         _ = path.relative_to(settings.SCRATCH_DIR) | ||||
|                         save_to_dir = settings.CONSUMPTION_DIR | ||||
|                     else: | ||||
|                     except ValueError: | ||||
|                         save_to_dir = path.parent | ||||
|  | ||||
|                     barcodes.save_to_dir( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user