aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lesana/collection.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lesana/collection.py b/lesana/collection.py
index ecb3eca..21eb364 100644
--- a/lesana/collection.py
+++ b/lesana/collection.py
@@ -78,7 +78,9 @@ class Entry(object):
# should be enough for all cases that we need.
for field in self.collection.settings['fields']:
if field['type'] == 'decimal':
- to_dump[field['name']] = str(to_dump.get(field['name'], ''))
+ v = to_dump.get(field['name'], '')
+ if v:
+ to_dump[field['name']] = str(v)
return ruamel.yaml.dump(to_dump, Dumper=ruamel.yaml.RoundTripDumper)
@property