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
67ad2d25
Commit
67ad2d25
authored
1 year ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-2890
: do/don't add copy annotations to name/description
parent
e8a86f80
No related branches found
No related tags found
1 merge request
!1287
TMSS-2890
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/backend/src/tmss/tmssapp/tasks.py
+3
-3
3 additions, 3 deletions
SAS/TMSS/backend/src/tmss/tmssapp/tasks.py
with
3 additions
and
3 deletions
SAS/TMSS/backend/src/tmss/tmssapp/tasks.py
+
3
−
3
View file @
67ad2d25
...
@@ -177,7 +177,7 @@ def copy_scheduling_unit_draft(scheduling_unit_draft: models.SchedulingUnitDraft
...
@@ -177,7 +177,7 @@ def copy_scheduling_unit_draft(scheduling_unit_draft: models.SchedulingUnitDraft
return
scheduling_unit_draft_copy
return
scheduling_unit_draft_copy
def
create_scheduling_unit_draft_from_scheduling_unit_blueprint
(
scheduling_unit_blueprint
:
models
.
SchedulingUnitBlueprint
,
remove_lofar1_stations
=
False
,
remove_lofar2_stations
=
False
)
->
models
.
SchedulingUnitDraft
:
def
create_scheduling_unit_draft_from_scheduling_unit_blueprint
(
scheduling_unit_blueprint
:
models
.
SchedulingUnitBlueprint
,
remove_lofar1_stations
=
False
,
remove_lofar2_stations
=
False
,
add_copy_annotations
:
bool
=
True
)
->
models
.
SchedulingUnitDraft
:
"""
"""
Create a SchedulingUnitDraft from the SchedulingUnitBlueprint
Create a SchedulingUnitDraft from the SchedulingUnitBlueprint
:raises Exception if instantiate fails.
:raises Exception if instantiate fails.
...
@@ -185,8 +185,8 @@ def create_scheduling_unit_draft_from_scheduling_unit_blueprint(scheduling_unit_
...
@@ -185,8 +185,8 @@ def create_scheduling_unit_draft_from_scheduling_unit_blueprint(scheduling_unit_
logger
.
debug
(
"
create_scheduling_unit_draft_from_scheduling_unit_blueprint(scheduling_unit_blueprint.id=%s)
"
,
scheduling_unit_blueprint
.
pk
)
logger
.
debug
(
"
create_scheduling_unit_draft_from_scheduling_unit_blueprint(scheduling_unit_blueprint.id=%s)
"
,
scheduling_unit_blueprint
.
pk
)
with
transaction
.
atomic
():
with
transaction
.
atomic
():
scheduling_unit_draft_copy
=
models
.
SchedulingUnitDraft
.
objects
.
create
(
name
=
"
%s
(Copy)
"
%
(
scheduling_unit_blueprint
.
name
,)[:
128
],
scheduling_unit_draft_copy
=
models
.
SchedulingUnitDraft
.
objects
.
create
(
name
=
"
%s
%s
"
%
(
scheduling_unit_blueprint
.
name
,
"
(Copy)
"
if
add_copy_annotations
else
""
)[:
128
],
description
=
"
%s
(Copy from blueprint id=
%s
)
"
%
(
scheduling_unit_blueprint
.
description
or
"
<no description>
"
,
scheduling_unit_blueprint
.
id
)[:
256
],
description
=
"
%s%s
"
%
(
scheduling_unit_blueprint
.
description
or
"
<no description>
"
,
"
(Copy from blueprint id=%s)
"
%
(
scheduling_unit_blueprint
.
id
,)
if
add_copy_annotations
else
""
)[:
256
],
scheduling_set
=
scheduling_unit_blueprint
.
draft
.
scheduling_set
,
scheduling_set
=
scheduling_unit_blueprint
.
draft
.
scheduling_set
,
observation_strategy_template
=
scheduling_unit_blueprint
.
draft
.
observation_strategy_template
,
observation_strategy_template
=
scheduling_unit_blueprint
.
draft
.
observation_strategy_template
,
specifications_template
=
scheduling_unit_blueprint
.
specifications_template
,
specifications_template
=
scheduling_unit_blueprint
.
specifications_template
,
...
...
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