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
c95dc4f2
Commit
c95dc4f2
authored
3 years ago
by
Jörn Künsemöller
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-1218
: create parsip ref on subtask creation
parent
359e20da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!648
TMSS-1218: Add parsets to SIPs and refer to the primary observation subtask as...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py
+11
-0
11 additions, 0 deletions
SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py
with
11 additions
and
0 deletions
SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py
+
11
−
0
View file @
c95dc4f2
...
...
@@ -125,6 +125,16 @@ class SIPidentifier(Model):
if
model
.
_state
.
adding
:
model
.
global_identifier
=
SIPidentifier
.
objects
.
create
(
source
=
"
TMSS
"
)
@staticmethod
def
assign_new_parset_id_to_model
(
model
):
"""
Create an Unique Identifier for given model class if model is being created.
"""
if
model
.
_state
.
adding
:
model
.
global_parset_identifier
=
SIPidentifier
.
objects
.
create
(
source
=
"
TMSS
"
)
#
# Instance Objects
#
...
...
@@ -336,6 +346,7 @@ class Subtask(BasicCommon, ProjectPropertyMixin, TemplateSchemaMixin):
self
.
annotate_validate_add_defaults_to_doc_using_template
(
'
specifications_doc
'
,
'
specifications_template
'
)
SIPidentifier
.
assign_new_id_to_model
(
self
)
SIPidentifier
.
assign_new_parset_id_to_model
(
self
)
# check for uniqueness of SAP names:
# todo: this is a very specific check, that depends on the template. On the task level, we have a javascript
...
...
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