Skip to content

Commit 49519b5

Browse files
committed
Fix validation issue
1 parent f481d07 commit 49519b5

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

serverdensity/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
__author__ = 'Jonathan Sundqvist'
55
__email__ = '[email protected]'
6-
__version__ = '0.1.29'
6+
__version__ = '0.1.30'
77

88

serverdensity/wrapper/jsonobject.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ def _validation(self, data):
8989
try:
9090
self._validator.validate(self._data)
9191
except ValidationError as e:
92+
path = ' > '.join(e.relative_schema_path)
9293
message = 'The schema {} gives the error: {}'.format(
93-
e.relative_schema_path, e.message)
94+
path, e.message)
9495
raise AttributeError(message)
9596

9697
def __iter__(self):

serverdensity/wrapper/schema/devices.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
"type": "object",
3939
"properties": {
4040
"countryCode": {
41-
"type": "string"
41+
"type": ["string", "null"]
4242
},
4343
"text": {
4444
"type": "string"
4545
},
4646
"countryName": {
47-
"type": "string"
47+
"type": ["string", "null"]
4848
}
4949
},
5050
"additionalProperties": false

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
setup(
3636
name='sd-python-wrapper',
37-
version='0.1.29',
37+
version='0.1.30',
3838
description="A python wrapper for the Server Density Api",
3939
long_description=readme + '\n\n', # + history,
4040
author="Jonathan Sundqvist",

0 commit comments

Comments
 (0)