Skip to content
GitLab
Explore
Sign in
Register
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
e9ca968d
Commit
e9ca968d
authored
4 years ago
by
Jörn Künsemöller
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-308
: add subtask id to validation error
parent
2edc1a51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!260
syncing cob-master with master again
,
!251
Resolve TMSS-308
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
+1
-1
1 addition, 1 deletion
SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
with
1 addition
and
1 deletion
SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
+
1
−
1
View file @
e9ca968d
...
@@ -204,7 +204,7 @@ class Subtask(BasicCommon):
...
@@ -204,7 +204,7 @@ class Subtask(BasicCommon):
sap_names
=
[
pointing
[
'
name
'
]
for
pointing
in
self
.
specifications_doc
[
'
stations
'
][
'
digital_pointings
'
]]
sap_names
=
[
pointing
[
'
name
'
]
for
pointing
in
self
.
specifications_doc
[
'
stations
'
][
'
digital_pointings
'
]]
duplicate_names
=
[
name
for
name
in
set
(
sap_names
)
if
sap_names
.
count
(
name
)
>
1
]
duplicate_names
=
[
name
for
name
in
set
(
sap_names
)
if
sap_names
.
count
(
name
)
>
1
]
if
duplicate_names
:
if
duplicate_names
:
raise
ValidationError
(
"
Pointings defined in the same Subtask must have unique names. Duplicate names
are
%s
"
%
duplicate_names
)
raise
ValidationError
(
"
Pointings defined in the same Subtask must have unique names. Duplicate names
%s in subtask id=
%s
.
"
%
(
duplicate_names
,
self
.
pk
)
)
# check if we have a start time or there were predecessors
# check if we have a start time or there were predecessors
if
self
.
state
.
value
==
SubtaskState
.
Choices
.
SCHEDULED
.
value
and
self
.
__original_state_id
==
SubtaskState
.
Choices
.
SCHEDULING
.
value
:
if
self
.
state
.
value
==
SubtaskState
.
Choices
.
SCHEDULED
.
value
and
self
.
__original_state_id
==
SubtaskState
.
Choices
.
SCHEDULING
.
value
:
...
...
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