Django

Code

Ticket #3275: fix_depth_bug.diff

File fix_depth_bug.diff, 443 bytes (added by marcin@elksoft.pl, 1 year ago)

Fix for the bug with non-zero depth

  • django/db/models/query.py

    old new  
    760763    """ 
    761764 
    762765    # If we've got a max_depth set and we've exceeded that depth, bail now. 
    763     if max_depth and cur_depth > max_depth: 
     766    if max_depth and cur_depth >= max_depth: 
    764767        return None 
    765768 
    766769    qn = backend.quote_name