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-08 07:33:02 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cce783611440e355f5b584daa0b409a668862b4a
cce78361
1 parent
348e9aab
validacion de archivos permitidos en endpoint comprobante
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
project/apps/edicto/serializer.py
project/apps/edicto/serializer.py
View file @
cce7836
...
...
@@ -82,6 +82,13 @@ class PagoSerializer(serializers.ModelSerializer):
return
data
@staticmethod
def
validate_archivo
(
value
):
filename
,
extension
=
value
.
name
.
rsplit
(
"."
,
1
)
if
extension
.
lower
()
not
in
EXTENSIONES_VALIDAS
:
raise
serializers
.
ValidationError
(
"Archivos permitidos: .pdf"
)
return
value
class
ComprobanteSerializer
(
serializers
.
ModelSerializer
):
...
...
Please
register
or
login
to post a comment