mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-30 23:47:53 +03:00 
			
		
		
		
	Support callable attributes in dotted source. Closes #2142.
This commit is contained in:
		
							parent
							
								
									2647e1aaaa
								
							
						
					
					
						commit
						1ffe4857ec
					
				|  | @ -68,8 +68,8 @@ def get_attribute(instance, attrs): | ||||||
|                 return instance[attr] |                 return instance[attr] | ||||||
|             except (KeyError, TypeError, AttributeError): |             except (KeyError, TypeError, AttributeError): | ||||||
|                 raise exc |                 raise exc | ||||||
|     if is_simple_callable(instance): |         if is_simple_callable(instance): | ||||||
|         return instance() |             return instance() | ||||||
|     return instance |     return instance | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user