HOTFIX: Migrated revocation
* adds handling for error raising if migrated revocation document missing, due to no existing document at all
This commit is contained in:
		
							parent
							
								
									8f89217ac1
								
							
						
					
					
						commit
						5e48202226
					
				@ -87,7 +87,7 @@ class AbstractDocument(BaseResource):
 | 
			
		||||
        """
 | 
			
		||||
        try:
 | 
			
		||||
            os.remove(self.file.file.name)
 | 
			
		||||
        except FileNotFoundError:
 | 
			
		||||
        except (FileNotFoundError, ValueError):
 | 
			
		||||
            # File seems to missing anyway - continue!
 | 
			
		||||
            pass
 | 
			
		||||
        super().delete(using=using, keep_parents=keep_parents)
 | 
			
		||||
@ -113,7 +113,7 @@ class AbstractDocument(BaseResource):
 | 
			
		||||
        """
 | 
			
		||||
        try:
 | 
			
		||||
            os.remove(self.file.file.name)
 | 
			
		||||
        except FileNotFoundError:
 | 
			
		||||
        except (FileNotFoundError, ValueError):
 | 
			
		||||
            pass
 | 
			
		||||
        self.file = new_file
 | 
			
		||||
        self.save()
 | 
			
		||||
        self.save()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user