File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -347,14 +347,14 @@ async def get(
347347                filters [schema .default_filter ] =  id 
348348            else :
349349                filters ["ids" ] =  [id ]
350-         elif  hfid :
350+         if  hfid :
351351            if  isinstance (schema , NodeSchema ) and  schema .human_friendly_id :
352352                filters ["hfid" ] =  hfid 
353353            else :
354354                raise  ValueError ("Cannot filter by HFID if the node doesn't have an HFID defined" )
355-         elif  kwargs :
356-             filters   =   kwargs 
357-         else :
355+         if  kwargs :
356+             filters . update ( kwargs ) 
357+         if   len ( filters )  ==   0 :
358358            raise  ValueError ("At least one filter must be provided to get()" )
359359
360360        results  =  await  self .filters (
@@ -1355,14 +1355,14 @@ def get(
13551355                filters [schema .default_filter ] =  id 
13561356            else :
13571357                filters ["ids" ] =  [id ]
1358-         elif  hfid :
1358+         if  hfid :
13591359            if  isinstance (schema , NodeSchema ) and  schema .human_friendly_id :
13601360                filters ["hfid" ] =  hfid 
13611361            else :
13621362                raise  ValueError ("Cannot filter by HFID if the node doesn't have an HFID defined" )
1363-         elif  kwargs :
1364-             filters   =   kwargs 
1365-         else :
1363+         if  kwargs :
1364+             filters . update ( kwargs ) 
1365+         if   len ( filters )  ==   0 :
13661366            raise  ValueError ("At least one filter must be provided to get()" )
13671367
13681368        results  =  self .filters (
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments