Skip to content

Commit 1aac5a1

Browse files
authored
Bugs (#4)
* Mini fix processing data in [][Serializers] method. * add readme type text
1 parent 9f1569f commit 1aac5a1

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

docs/release-notes.md

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Medium version numbers (0.x.0) may include API changes, in line with the [deprec
88

99
Major version numbers (x.0.0) are reserved for substantial project milestones.
1010

11+
### 0.2.1
12+
13+
**Date:** [22th May 2019]
14+
15+
* Mini fix processing data in [`Serializers`][Serializers] `_field_validation` method.
16+
1117
### 0.2.0
1218

1319
**Date:** [3th April 2019]

rest_framework/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
__/ |
99
|___/
1010
"""
11-
VERSION = (0, 2, 0)
11+
VERSION = (0, 2, 1)
1212

1313
__title__ = 'Python-Rest-Framework'
1414
__author__ = 'Deys Timofey'
@@ -17,5 +17,3 @@
1717
__license__ = 'Apache License 2.0'
1818
__url__ = 'https://github.com/nxexox/python-rest-framework'
1919
__version__ = '.'.join(map(str, VERSION))
20-
21-
# Auto version https://github.com/pypa/setuptools_scm

rest_framework/serializers/serializers.py

+3
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ def _field_validation(self, fields_dict, data):
378378
except ValidationError as e:
379379
# If not passed validation, save the error.
380380
errors[field_name] = e.detail
381+
except (AttributeError, TypeError, ValueError):
382+
# If data not valid format.
383+
errors[field_name] = 'Could not parse data for field `{}`.'.format(field_name)
381384

382385
if any(errors):
383386
raise ValidationError(errors)

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
license='Apache 2.0', # Put the license.
1717
description='Python Rest Framework. Box utils for easy makes rest api on python',
1818
long_description=README,
19+
long_description_content_type='text/markdown',
1920
url=rest_framework.__url__,
2021
author=rest_framework.__author__,
2122
author_email=rest_framework.__email__,

0 commit comments

Comments
 (0)