handle EmptyResultSet

django 1.6 raises EmptyResultSet for queries with no results.