Skip to content

Commit fc5cd85

Browse files
committed
Do not add value-type when it is not needed.
1 parent da4f6eb commit fc5cd85

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ppp_datamodel/nodes/resource.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def as_dict(self):
5252
type_ = d.get('value-type', self._value_type)
5353
value = d.get('value')
5454
d['value'] = self._format_value(value)
55-
d['value-type'] = type_
55+
if type_ not in ('string', 'unknown') or 'value-type' in d:
56+
d['value-type'] = type_
5657
return d
5758

5859
@register_valuetype

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name='ppp_datamodel',
7-
version='0.5.15',
7+
version='0.5.16',
88
description='Data model for the Projet Pensées Profondes.',
99
url='https://github.com/ProjetPP/PPP-datamodel-Python',
1010
author='Valentin Lorentz',

0 commit comments

Comments
 (0)