Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
7cf07cef
Commit
7cf07cef
authored
Feb 04, 2020
by
Gladys Forte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{dev bugfix} add validations on patch
parent
11fe52b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/applicationlayer/cms/form/header/views.py
app/applicationlayer/cms/form/header/views.py
+3
-1
app/applicationlayer/cms/template/header/views.py
app/applicationlayer/cms/template/header/views.py
+3
-2
No files found.
app/applicationlayer/cms/form/header/views.py
View file @
7cf07cef
...
@@ -752,6 +752,7 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
...
@@ -752,6 +752,7 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
return
Response
(
message
,
status
=
status
.
HTTP_200_OK
)
return
Response
(
message
,
status
=
status
.
HTTP_200_OK
)
@
FormValidation
@
transaction
.
atomic
@
transaction
.
atomic
@
action
(
@
action
(
methods
=
[
'PATCH'
],
detail
=
True
,
methods
=
[
'PATCH'
],
detail
=
True
,
...
@@ -864,7 +865,8 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
...
@@ -864,7 +865,8 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
)
)
return
Response
(
message
,
status
=
status
.
HTTP_200_OK
)
return
Response
(
message
,
status
=
status
.
HTTP_200_OK
)
@
FormValidation
@
transaction
.
atomic
@
transaction
.
atomic
@
action
(
@
action
(
methods
=
[
'PATCH'
],
detail
=
True
,
methods
=
[
'PATCH'
],
detail
=
True
,
...
...
app/applicationlayer/cms/template/header/views.py
View file @
7cf07cef
...
@@ -187,10 +187,11 @@ class ChangeRequestTemplatesViewset(viewsets.ModelViewSet):
...
@@ -187,10 +187,11 @@ class ChangeRequestTemplatesViewset(viewsets.ModelViewSet):
except
Exception
as
e
:
except
Exception
as
e
:
return
Response
(
e
,
return
Response
(
e
,
status
=
status
.
HTTP_500_INTERNAL_SERVER_ERROR
)
status
=
status
.
HTTP_500_INTERNAL_SERVER_ERROR
)
@
TemplateValidation
@
transaction
.
atomic
@
transaction
.
atomic
def
partial_update
(
self
,
request
,
*
args
,
**
kwargs
):
def
partial_update
(
self
,
request
,
*
args
,
**
kwargs
):
partial
=
kwargs
.
pop
(
'partial'
,
True
)
partial
=
kwargs
.
pop
(
'partial'
,
True
)
instance
=
self
.
get_object
()
instance
=
self
.
get_object
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment