pythoncn/june — pull request #79 by liuw (2014-04-12 21:09:41+00:00)
Title: handlers/front: fix sqlalchemy query

If home_node_ids is empty, we can get:
SAWarning: The IN-predicate on "topic.node_id" was invoked with an empty
sequence. This results in a contradiction, which nonetheless can be expensive
to evaluate. Consider alternative strategies for improved performance.
return o[0](self, self.expr, op, *(other + o[1:]), **kwargs)

Querying on an empty sequence is expensive.

Signed-off-by: Wei Liu