File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 55
66def  get_callback_function (settings_name , default = None ):
77    """Return the callback function for the given settings name.""" 
8- 
98    callback  =  getattr (settings , settings_name , None )
109    if  not  callback :
1110        return  default 
@@ -22,12 +21,11 @@ def get_callback_function(settings_name, default=None):
2221
2322
2423def  get_task_props_extension (request , task_props ):
25-     """Extend the task properties with custom properties to fill custom models.""" 
26- 
27-     task_props_extension  =  extend_task_props_callback (request , task_props ) or  {}
28-     if  task_props_extension  is  None :
24+     """Extend the task properties with custom props to fill custom models.""" 
25+     if  not  extend_task_props_callback :
2926        return  {}
3027
28+     task_props_extension  =  extend_task_props_callback (request , task_props ) or  {}
3129    if  not  isinstance (task_props_extension , Mapping ):
3230        raise  ImproperlyConfigured (
3331            "CELERY_RESULTS_EXTEND_TASK_PROPS_CALLBACK must return a Mapping " 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments