Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
fe42a646
Verified
Commit
fe42a646
authored
2 years ago
by
Erwan Rouchet
Browse files
Options
Downloads
Patches
Plain Diff
Disambiguate the two process IDs in the ApplyProcessTemplate API docs
parent
867492a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1887
Disambiguate the two process IDs in the ApplyProcessTemplate API docs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arkindex/process/api.py
+10
-1
10 additions, 1 deletion
arkindex/process/api.py
arkindex/process/serializers/imports.py
+6
-1
6 additions, 1 deletion
arkindex/process/serializers/imports.py
with
16 additions
and
2 deletions
arkindex/process/api.py
+
10
−
1
View file @
fe42a646
...
...
@@ -1752,8 +1752,17 @@ class CreateProcessTemplate(ProcessACLMixin, WorkerACLMixin, CreateAPIView):
@extend_schema_view
(
post
=
extend_schema
(
operation_id
=
'
ApplyProcessTemplate
'
,
parameters
=
[
OpenApiParameter
(
'
id
'
,
type
=
UUID
,
location
=
OpenApiParameter
.
PATH
,
description
=
'
ID of the template to apply
'
,
required
=
True
,
),
],
responses
=
{
200
:
ProcessSerializer
,
403
:
None
},
tags
=
[
'
process
'
]
tags
=
[
'
process
'
]
,
))
class
ApplyProcessTemplate
(
ProcessACLMixin
,
WorkerACLMixin
,
CreateAPIView
):
"""
...
...
This diff is collapsed.
Click to expand it.
arkindex/process/serializers/imports.py
+
6
−
1
View file @
fe42a646
...
...
@@ -286,7 +286,12 @@ class CreateProcessTemplateSerializer(serializers.ModelSerializer):
class
ApplyProcessTemplateSerializer
(
ProcessACLMixin
,
serializers
.
Serializer
):
process_id
=
serializers
.
PrimaryKeyRelatedField
(
queryset
=
Process
.
objects
.
all
(),
source
=
'
process
'
,
required
=
True
)
process_id
=
serializers
.
PrimaryKeyRelatedField
(
queryset
=
Process
.
objects
.
all
(),
source
=
'
process
'
,
required
=
True
,
help_text
=
'
ID of the process to apply the template to
'
,
)
def
create
(
self
,
validated_data
):
# The endpoint should copy all the worker runs content from the source 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