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
88a8ee0e
Commit
88a8ee0e
authored
Nov 12, 2019
by
Gladys Forte
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #447 in RMS/api-main-service from gladys-dev2 to RMSv2
* commit '
efea3299
': update fix
parents
e5639531
efea3299
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
app/applicationlayer/management/delegation/views.py
app/applicationlayer/management/delegation/views.py
+7
-4
app/entities/models.py
app/entities/models.py
+0
-1
No files found.
app/applicationlayer/management/delegation/views.py
View file @
88a8ee0e
...
@@ -116,9 +116,12 @@ class DelegationViewSet(viewsets.ModelViewSet):
...
@@ -116,9 +116,12 @@ class DelegationViewSet(viewsets.ModelViewSet):
@
transaction
.
atomic
@
transaction
.
atomic
def
update
(
self
,
request
,
*
args
,
**
kwargs
):
def
update
(
self
,
request
,
*
args
,
**
kwargs
):
partial
=
kwargs
.
pop
(
'partial'
,
Fals
e
)
partial
=
kwargs
.
pop
(
'partial'
,
Tru
e
)
instance
=
self
.
get_object
()
instance
=
self
.
get_object
()
serializer
=
self
.
get_serializer
(
instance
,
data
=
request
.
data
,
partial
=
partial
)
serializer
=
self
.
get_serializer
(
instance
,
data
=
request
.
data
,
partial
=
partial
)
serializer
.
is_valid
(
raise_exception
=
True
)
serializer
.
is_valid
(
raise_exception
=
True
)
old_instance
=
model_to_dict
(
instance
)
old_instance
=
model_to_dict
(
instance
)
...
...
app/entities/models.py
View file @
88a8ee0e
...
@@ -100,7 +100,6 @@ class Delegation(AuditClass):
...
@@ -100,7 +100,6 @@ class Delegation(AuditClass):
def
save
(
self
,
*
args
,
**
kwargs
):
def
save
(
self
,
*
args
,
**
kwargs
):
super
(
Delegation
,
self
)
.
save
(
*
args
,
**
kwargs
)
super
(
Delegation
,
self
)
.
save
(
*
args
,
**
kwargs
)
code
=
enums
.
GenerateCode
.
DELEGATION
.
value
code
=
number_generator
(
enums
.
GenerateCode
.
DELEGATION
.
value
,
self
.
id
)
code
=
number_generator
(
enums
.
GenerateCode
.
DELEGATION
.
value
,
self
.
id
)
Delegation
.
objects
.
filter
(
id
=
self
.
id
)
.
update
(
code
=
code
)
Delegation
.
objects
.
filter
(
id
=
self
.
id
)
.
update
(
code
=
code
)
...
...
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