mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 09:57:53 +03:00 
			
		
		
		
	Added support for Django 1.8.x
Since I didn't know why the `rel` attribute wasn't there in the first place, maybe it's better to use the `remote_field` only if it's there and leave `rel` as a default (i.e else).
This commit is contained in:
		
							parent
							
								
									e51f6070df
								
							
						
					
					
						commit
						e12c329507
					
				| 
						 | 
				
			
			@ -57,7 +57,7 @@ class GrapheneFilterSetMixin(BaseFilterSet):
 | 
			
		|||
        Global IDs (the default implementation expects database
 | 
			
		||||
        primary keys)
 | 
			
		||||
        """
 | 
			
		||||
        rel = f.field.remote_field
 | 
			
		||||
        rel = f.field.remote_field if hasattr(f.field, 'remote_field') else f.field.rel
 | 
			
		||||
        default = {
 | 
			
		||||
            'name': name,
 | 
			
		||||
            'label': capfirst(rel.related_name)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user