Admin Inline with Exclude fails if two fkeys to same parent are present, despite fk_name being used
    
    
    
      
      
      
        
[ quick and dirty bug post (appears to be a small localized one); will try to add patch and tests in a short while ]
In validate_inline(), the check for excluded fkey neglects to pass the cls.fk_name arg to _get_foreign_key (line 172 in the current trunk revision) - thus the fk_name parameter given in the Inline is ignored and _get_foreign_key finds multiple fkeys to same parent - raising an exception.
       
     
   
 
      
        
        
          Change History
          (4)
        
          
  
  
  
    
      | Triage Stage: | 
      
        Unreviewed → Accepted
       | 
    
  
 
           
          
  
  
  
    
      | Owner: | 
      
        changed from nobody to Brian Rosner
       | 
    
    
      | Status: | 
      
        new → assigned
       | 
    
  
 
           
          
  
  
  
    
      | Resolution: | 
      
        → fixed
       | 
    
    
      | Status: | 
      
        assigned → closed
       | 
    
  
 
           
          
          
         
       
     
        
    
    
(In [11630]) Fixed #11709 — Pass inline fk_name attribute when grabbing foreign key to test for exclusion. Thanks yishaibeeri for the report.