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
d9b29e70
Commit
d9b29e70
authored
Jan 16, 2020
by
John Red Medrano
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #666 in RMS/api-main-service from red-develop to product-dev
* commit '
5e5b16c4
': fixing pic
parents
238760bb
5e5b16c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
app/applicationlayer/management/account/serializer.py
app/applicationlayer/management/account/serializer.py
+11
-7
app/applicationlayer/management/account/views.py
app/applicationlayer/management/account/views.py
+2
-2
No files found.
app/applicationlayer/management/account/serializer.py
View file @
d9b29e70
...
@@ -96,13 +96,17 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
...
@@ -96,13 +96,17 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
def
get_image
(
self
,
user
):
def
get_image
(
self
,
user
):
request
=
self
.
context
.
get
(
'request'
)
request
=
self
.
context
.
get
(
'request'
)
primayPic
=
user
.
user_images
.
fi
lter
(
is_primary
=
True
)
.
fi
rst
()
primayPic
=
user
.
user_images
.
first
()
if
primayPic
:
# print(primayPic)
path
=
request
.
build_absolute_uri
(
primayPic
.
image
.
url
)
path
=
request
.
build_absolute_uri
(
primayPic
.
image
.
url
)
path
=
path
.
replace
(
'http'
,
'https
'
)
path
=
path
.
replace
(
'https'
,
'http
'
)
return
path
return
path
else
:
# if primayPic:
return
request
.
build_absolute_uri
(
'/media/no-user.png'
)
# path = request.build_absolute_uri(primayPic.image.url)
# path = path.replace('http', 'https')
# return path
# else:
# return request.build_absolute_uri('/media/no-user.png')
def
get_applications
(
self
,
user
):
def
get_applications
(
self
,
user
):
if
user
.
user_type
.
upper
()
==
enums
.
UserTypeEnum
.
USER
.
value
:
if
user
.
user_type
.
upper
()
==
enums
.
UserTypeEnum
.
USER
.
value
:
...
...
app/applicationlayer/management/account/views.py
View file @
d9b29e70
...
@@ -402,8 +402,8 @@ class UserViewSet(viewsets.ModelViewSet):
...
@@ -402,8 +402,8 @@ class UserViewSet(viewsets.ModelViewSet):
FileHelper
.
DeleteFile
(
path
=
item
.
image
.
path
)
FileHelper
.
DeleteFile
(
path
=
item
.
image
.
path
)
FileHelper
.
DeleteFile
(
path
=
eximages
.
first
()
.
image
.
path
)
#
FileHelper.DeleteFile(path=eximages.first().image.path)
eximages
.
first
()
.
delete
()
#
eximages.first().delete()
# self.serializer_class = serializer.UserImageSerializer
# self.serializer_class = serializer.UserImageSerializer
...
...
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