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
8ca96fe7
Commit
8ca96fe7
authored
Oct 03, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing
parent
f198848c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
app/applicationlayer/cms/template/header/views.py
app/applicationlayer/cms/template/header/views.py
+2
-1
app/applicationlayer/management/user/serializers.py
app/applicationlayer/management/user/serializers.py
+2
-4
No files found.
app/applicationlayer/cms/template/header/views.py
View file @
8ca96fe7
...
@@ -186,7 +186,8 @@ class ChangeRequestTemplatesViewset(viewsets.ModelViewSet):
...
@@ -186,7 +186,8 @@ class ChangeRequestTemplatesViewset(viewsets.ModelViewSet):
partial
=
kwargs
.
pop
(
'partial'
,
False
)
partial
=
kwargs
.
pop
(
'partial'
,
False
)
instance
=
self
.
get_object
()
instance
=
self
.
get_object
()
template_no
=
kwargs
[
'template_no'
]
# template_no = kwargs['template_no']
template_no
=
instance
.
template_no
body_data
=
request
.
data
body_data
=
request
.
data
...
...
app/applicationlayer/management/user/serializers.py
View file @
8ca96fe7
...
@@ -89,6 +89,7 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
...
@@ -89,6 +89,7 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
else
:
else
:
permission
=
True
permission
=
True
return
permission
return
permission
def
get_create_template
(
self
,
user
):
def
get_create_template
(
self
,
user
):
check_user
=
models
.
AllowedCompany
.
objects
.
filter
(
check_user
=
models
.
AllowedCompany
.
objects
.
filter
(
Q
(
id_number
=
user
.
code
)
&
Q
(
id_number
=
user
.
code
)
&
...
@@ -111,17 +112,14 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
...
@@ -111,17 +112,14 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
return
request
.
build_absolute_uri
(
'/media/no-user.png'
)
return
request
.
build_absolute_uri
(
'/media/no-user.png'
)
def
get_applications
(
self
,
user
):
def
get_applications
(
self
,
user
):
# app = user.application.exclude(id=1)
if
user
.
user_type
.
upper
()
==
enums
.
UserTypeEnum
.
USER
.
value
:
if
user
.
user_type
.
upper
()
==
enums
.
UserTypeEnum
.
USER
.
value
:
app
=
user
.
application
.
exclude
(
id
=
1
)
app
=
user
.
application
.
exclude
(
id
=
1
)
else
:
else
:
app
=
user
.
application
.
all
()
app
=
user
.
application
.
all
()
list_app
=
[]
list_app
=
[]
initial_mod
=
{}
rms
=
models
.
Application
.
objects
.
filter
(
id
=
1
)
.
values
()
.
first
()
for
data
in
app
:
for
data
in
app
:
mod
=
data
.
modules
.
filter
(
~
Q
(
name__icontains
=
'header'
)
)
mod
=
data
.
modules
.
all
(
)
if
user
.
user_type
.
upper
()
!=
enums
.
UserTypeEnum
.
USER
.
value
:
if
user
.
user_type
.
upper
()
!=
enums
.
UserTypeEnum
.
USER
.
value
:
if
user
.
user_type
.
upper
()
!=
enums
.
UserTypeEnum
.
USER
.
value
:
if
user
.
user_type
.
upper
()
!=
enums
.
UserTypeEnum
.
USER
.
value
:
user_module
=
models
.
Module
.
objects
.
filter
(
user_module
=
models
.
Module
.
objects
.
filter
(
...
...
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