Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Marta Miranda
/
boletin_api
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Enzo Yair
2023-09-18 17:37:09 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8a8bf14374768fa555b8f69d12a8f172ee2adb81
8a8bf143
1 parent
f3c27f6c
validacion en metodo post para usuario
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
project/apps/edicto/serializer.py
project/apps/edicto/serializer.py
View file @
8a8bf14
...
...
@@ -42,8 +42,13 @@ class EdictoSerializer(serializers.ModelSerializer):
edicto
=
data
.
get
(
'cuerpo_edicto'
,
''
)
cantidad_palabras
=
contador
(
edicto
)
data
[
'cantidad_palabras'
]
=
cantidad_palabras
data
[
'usuario'
]
=
self
.
context
[
'request'
]
.
user
data
[
'usuario_movimiento'
]
=
self
.
context
[
'request'
]
.
user
request
=
self
.
context
[
'request'
]
if
request
.
method
==
'POST'
:
data
[
'usuario'
]
=
request
.
user
data
[
'usuario_movimiento'
]
=
request
.
user
else
:
pass
data
[
'usuario_movimiento'
]
=
request
.
user
return
data
@staticmethod
...
...
Please
register
or
login
to post a comment