mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.6.x] Fixed #21129 -- Prevented admin filter params modifications from throwing an exception.
Thanks Tuttle for the report.
Backport of 5381317fe3 from master
			
			
This commit is contained in:
		| @@ -306,6 +306,10 @@ class BaseModelAdmin(six.with_metaclass(RenameBaseModelAdminMethods)): | ||||
|                 # later. | ||||
|                 return True | ||||
|             if hasattr(field, 'rel'): | ||||
|                 if field.rel is None: | ||||
|                     # This property or relation doesn't exist, but it's allowed | ||||
|                     # since it's ignored in ChangeList.get_filters(). | ||||
|                     return True | ||||
|                 model = field.rel.to | ||||
|                 rel_name = field.rel.get_related_field().name | ||||
|             elif isinstance(field, RelatedObject): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user