cylc/cylc — pull request #1067 by matthewrmshin (2014-08-07 11:18:03+00:00)
Title: Improve runtime database query functions

No longer susceptible to the `.next()[0]` problem when `.next()` is returning `None`.

(This pull request contains more changes that I have done as part of the log and work restructure change, but should really be separate.)