Mercurial > odfcast > odfcast
comparison odfcast/convert.py @ 34:89ffa12bd48d
Allow to not passing any datadict to the conversion form
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 16 Oct 2014 11:47:05 +0200 |
parents | 00e12392f8d4 |
children | a1100ec32be2 |
comparison
equal
deleted
inserted
replaced
33:00e12392f8d4 | 34:89ffa12bd48d |
---|---|
94 | 94 |
95 def get_mimetype_for_format(self, fformat): | 95 def get_mimetype_for_format(self, fformat): |
96 return MIMETYPES.get(fformat, DEFAULT_MIMETYPE) | 96 return MIMETYPES.get(fformat, DEFAULT_MIMETYPE) |
97 | 97 |
98 def get_datadict(self): | 98 def get_datadict(self): |
99 vars = request.form['datadict'] | 99 vars = request.form.get('datadict') |
100 if not vars: | 100 if not vars: |
101 return None | 101 return None |
102 return json.loads(vars) | 102 return json.loads(vars) |
103 | 103 |
104 | 104 |