Skip to content

Commit

Permalink
Merge pull request #84 from dimagi/unicoding
Browse files Browse the repository at this point in the history
unicode() instead of string()
  • Loading branch information
esoergel committed Jan 28, 2014
2 parents a82b593 + ff0a410 commit 92f8ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions couchforms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ def _clean(meta_block):
# (see https://github.com/benoitc/couchdbkit/blob/a23343e539370cffcf8b0ce483c712911bb022c1/couchdbkit/schema/properties.py#L1038)
if meta_block.get('appVersion') is not None and not isinstance(meta_block['appVersion'], basestring):
if isinstance(meta_block['appVersion'], dict) and '#text' in meta_block['appVersion']:
ret['appVersion'] = str(meta_block['appVersion']['#text'])
ret['appVersion'] = unicode(meta_block['appVersion']['#text'])
else:
ret['appVersion'] = str(meta_block['appVersion'])
ret['appVersion'] = unicode(meta_block['appVersion'])

if meta_block:
for key in ("timeStart", "timeEnd"):
Expand Down

0 comments on commit 92f8ff5

Please sign in to comment.