Fix a crash when loading datagrid columns.

Review Request #9918 — Created May 8, 2018 and submitted

david
Djblets
release-1.0.x
9b0a8bb...
djblets

We would occasionally hit errors when loading datagrids, typically
caused by web crawlers. In the case where the user profile or the
querystring specified column names, but none of them were valid, we'd
progress through building the (empty) list of columns and then crash
trying to index into it.

This change moves things around a bit so that instead of just testing to
make sure the comma-separated list of column names isn't empty, we try
to load all of the columns and then check if that resulting list is
empty, defaulting to the standard set of columns if so.

Loaded /users/X/&columns=,. Before this change, it would crash with
an IndexError. After, it loads successfully.

brennie
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (3d0e413)
Loading...