Handle tuple returns from get_sort_field()

Review Request #10278 — Created Oct. 25, 2018 and updated

gojeffcho
Djblets
release-2.0.x
10277
10277
d0adbe5...
djblets, students

This fix enables handling of tuples as returns from a Column's
get_sort_field() during precompute_objects(). This is related to
the "Make all columns sortable on /users/ page" fix.

All tests pass for Djblets.

Description From Last Updated

No need to include "Djblets" in the title since it will land in Djblets :)

brenniebrennie

Actually, this patch doesn't merge cleanly on the latest release-2.0.x. Could you pull and rebase?

daviddavid

Old debug output?

zr5dtzr5dt

Looking at this one more time, I think we still need the truthy check here. Let's change this to be ...

daviddavid

My issue with this code it unfounded.

zr5dtzr5dt

Why is this not a triple-quoted comment

zr5dtzr5dt
gojeffcho
gojeffcho
brennie
  1. 
      
  2. No need to include "Djblets" in the title since it will land in Djblets :)

  3. 
      
gojeffcho
david
  1. Ship It!

  2. 
      
david
  1. 
      
  2. Actually, this patch doesn't merge cleanly on the latest release-2.0.x. Could you pull and rebase?

  3. 
      
gojeffcho
gojeffcho
zr5dt
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 4)
     
     
    This is a cool tool
  3. 
      
zr5dt
  1. Ship It!
  2. 
      
zr5dt
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 4)
     
     

    My issue with this code it unfounded.

  3. 
      
zr5dt
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 4)
     
     
     
     
     
     
     
     

    Why is this not a triple-quoted comment

  3. 
      
zr5dt
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 1)
     
     

    Old debug output?

    1. It is, and is no longer present in the latest diff.

  3. 
      
david
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 4)
     
     

    Looking at this one more time, I think we still need the truthy check here. Let's change this to be elif sort_field:

  3. 
      
gojeffcho
Review request changed

Commit:

-06c14dff24b93f297c1823e47e45b30cccdd65e8
+d0adbe51160b68f299fea6dc2eeebaebc2760483

Diff:

Revision 5 (+9 -1)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...