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
7e294b20
Commit
7e294b20
authored
Nov 26, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed password on endpoint of user list on routing table and bug fix on template user list
parent
d7cd4df2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
app/applicationlayer/cms/master/template/account/views.py
app/applicationlayer/cms/master/template/account/views.py
+1
-6
app/applicationlayer/management/account/serializer.py
app/applicationlayer/management/account/serializer.py
+8
-0
app/applicationlayer/master/Account/serializer.py
app/applicationlayer/master/Account/serializer.py
+2
-1
No files found.
app/applicationlayer/cms/master/template/account/views.py
View file @
7e294b20
...
...
@@ -27,12 +27,7 @@ class UserListTemplate(APIView):
user_list
=
models
.
User
.
objects
.
filter
(
code__in
=
verified_users
)
.
annotate
(
company_code
=
F
(
'department__company__code'
),
company_name
=
F
(
'department__company__name'
),
department_code
=
F
(
'department__code'
),
department_name
=
F
(
'department__name'
)
)
.
values
()
)
print
(
user_list
)
...
...
app/applicationlayer/management/account/serializer.py
View file @
7e294b20
...
...
@@ -50,6 +50,14 @@ class UserEditSerializer(serializers.ModelSerializer):
class
ChangeRequestList
(
serializers
.
ModelSerializer
):
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
ret
[
'company_name'
]
=
instance
.
department
.
company
.
code
ret
[
'company_code'
]
=
instance
.
department
.
company
.
name
ret
[
'department_code'
]
=
instance
.
department
.
code
ret
[
'department_name'
]
=
instance
.
department
.
name
return
ret
class
Meta
:
model
=
User
fields
=
(
...
...
app/applicationlayer/master/Account/serializer.py
View file @
7e294b20
...
...
@@ -16,7 +16,8 @@ class AdminAccountSerializer(serializers.ModelSerializer):
class
Meta
:
model
=
User
fields
=
'__all__'
#
fields = '__all__'
read_only_fields
=
(
'created'
,
'createdby'
,
'modified'
,
'modifiedby'
,
'code'
,
)
exclude
=
(
'password'
,)
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