Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
c932a5e9
Commit
c932a5e9
authored
8 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
Task #9607: bug fix: return empty list in case a task has no predecessors or successors, not None.
parent
6a39a13a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/ResourceAssignment/ResourceAssignmentDatabase/radb.py
+7
-6
7 additions, 6 deletions
SAS/ResourceAssignment/ResourceAssignmentDatabase/radb.py
with
7 additions
and
6 deletions
SAS/ResourceAssignment/ResourceAssignmentDatabase/radb.py
+
7
−
6
View file @
c932a5e9
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment