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
69a34b1f
Commit
69a34b1f
authored
Sep 20, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #120 in RMS/api-main-service from red-develop to RMSv2
* commit '
9c57a617
': added auto set rms on edit
parents
9d8d89af
9c57a617
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
app/applicationlayer/management/account/views.py
app/applicationlayer/management/account/views.py
+15
-4
No files found.
app/applicationlayer/management/account/views.py
View file @
69a34b1f
...
...
@@ -159,13 +159,24 @@ class UserViewSet(viewsets.ModelViewSet):
old_instance
=
model_to_dict
(
instance
)
self
.
perform_update
(
serializer
)
app
=
request
.
data
[
'application'
]
if
request
.
data
[
'user_type'
]
!=
'USR'
:
rms
=
Application
.
objects
.
filter
(
id
=
1
)
.
values
(
'code'
)
.
first
()
app
.
append
(
rms
[
'code'
])
# else:
# app = request.data['application']
app
=
Application
.
objects
.
filter
(
code__in
=
request
.
data
[
'application'
]
code__in
=
app
)
# instance2
= User.objects.get(
#
id=serializer.data['id']
#
)
instance
=
User
.
objects
.
get
(
id
=
serializer
.
data
[
'id'
]
)
instance
.
application
.
set
(
app
)
...
...
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