mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +03:00 
			
		
		
		
	Remove excessive class instance while getting http_method_names
This commit is contained in:
		
							parent
							
								
									6075f8051a
								
							
						
					
					
						commit
						518bb44a9e
					
				| 
						 | 
					@ -247,7 +247,7 @@ class EndpointInspector(object):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        if hasattr(callback, 'actions'):
 | 
					        if hasattr(callback, 'actions'):
 | 
				
			||||||
            actions = set(callback.actions.keys())
 | 
					            actions = set(callback.actions.keys())
 | 
				
			||||||
            http_method_names = set(callback.cls().http_method_names)
 | 
					            http_method_names = set(callback.cls.http_method_names)
 | 
				
			||||||
            return [method.upper() for method in actions & http_method_names]
 | 
					            return [method.upper() for method in actions & http_method_names]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return [
 | 
					        return [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user