diff --git a/taiga/base/neighbors.py b/taiga/base/neighbors.py index 7b4adbfb..d803b4ae 100644 --- a/taiga/base/neighbors.py +++ b/taiga/base/neighbors.py @@ -53,6 +53,9 @@ def get_neighbors(obj, results_set=None): cursor = connection.cursor() cursor.execute(query, params) row = cursor.fetchone() + if row is None: + return Neighbor(None, None) + obj_position = row[1] - 1 try: