mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[2.0.x] Fixed outdated comment in RelatedObjectDoesNotExist.
Backport of 0a69479b6c from master
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							a831e4bad0
						
					
				
				
					commit
					3640693914
				
			| @@ -88,8 +88,8 @@ class ForwardManyToOneDescriptor: | |||||||
|     @cached_property |     @cached_property | ||||||
|     def RelatedObjectDoesNotExist(self): |     def RelatedObjectDoesNotExist(self): | ||||||
|         # The exception can't be created at initialization time since the |         # The exception can't be created at initialization time since the | ||||||
|         # related model might not be resolved yet; `rel.model` might still be |         # related model might not be resolved yet; `self.field.model` might | ||||||
|         # a string model reference. |         # still be a string model reference. | ||||||
|         return type( |         return type( | ||||||
|             'RelatedObjectDoesNotExist', |             'RelatedObjectDoesNotExist', | ||||||
|             (self.field.remote_field.model.DoesNotExist, AttributeError), |             (self.field.remote_field.model.DoesNotExist, AttributeError), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user