Skip to content
Snippets Groups Projects
Commit c932a5e9 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #9607: bug fix: return empty list in case a task has no predecessors or successors, not None.

parent 6a39a13a
Branches
Tags
No related merge requests found
...@@ -191,12 +191,6 @@ class RADatabase: ...@@ -191,12 +191,6 @@ class RADatabase:
query += ' WHERE ' + ' AND '.join(conditions) query += ' WHERE ' + ' AND '.join(conditions)
tasks = list(self._executeQuery(query, qargs, fetch=_FETCH_ALL)) tasks = list(self._executeQuery(query, qargs, fetch=_FETCH_ALL))
predIds = self.getTaskPredecessorIds()
succIds = self.getTaskSuccessorIds()
for task in tasks:
task['predecessor_ids'] = predIds.get(task['id'], [])
task['successor_ids'] = succIds.get(task['id'], [])
return tasks return tasks
...@@ -220,6 +214,13 @@ class RADatabase: ...@@ -220,6 +214,13 @@ class RADatabase:
task = dict(result) if result else None task = dict(result) if result else None
if task:
if task['predecessor_ids'] is None:
task['predecessor_ids'] = []
if task['successor_ids'] is None:
task['successor_ids'] = []
return task return task
def _convertTaskTypeAndStatusToIds(self, task_status, task_type): def _convertTaskTypeAndStatusToIds(self, task_status, task_type):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment