Skip to content

Commit

Permalink
Merge pull request nkrkv#1 from IrisDreams-LLP/irisdreamskz-boolean-i…
Browse files Browse the repository at this point in the history
…ssue

Boolean value handling
  • Loading branch information
irisdreamskz authored Apr 21, 2024
2 parents 5d73dcd + 9c0e6b6 commit 8806878
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions insales/composing.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def compose_element(key, value, arrays={}):
e = et.Element(key)
if isinstance(value, basestring):
e.text = value
elif isinstance(value, bool):
e.attrib['type'] = 'boolean'
e.text = str(value).lower()
elif isinstance(value, (int, long)):
e.attrib['type'] = 'integer'
e.text = str(value)
Expand Down

0 comments on commit 8806878

Please sign in to comment.