Prevent unnecessary queries in the datagrid for None values.
Review Request #7632 — Created Sept. 17, 2015 and submitted
The query optimizer in the datagrid code wasn't checking if associated IDs were None, and still tried to look them up from the database. This was silly and pointless. It no longer tries to do such things.
Saw this appear in a list of queries before-hand. Fixed it, and saw that
the queries were no longer appearing.