Skip to content

Commit

Permalink
Add boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Nov 28, 2018
1 parent 8bd0e4b commit 2552980
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion daiquiri/core/adapter/database/postgres.py
Expand Up @@ -24,7 +24,7 @@ class PostgreSQLAdapter(BaseDatabaseAdapter):
'arraysize': True
},
'boolean': {
'datatype': 'unsignedByte',
'datatype': 'boolean',
'arraysize': False
},
'smallint': {
Expand Down
2 changes: 1 addition & 1 deletion daiquiri/core/generators.py
Expand Up @@ -63,7 +63,7 @@ def generate_votable(generator, fields, infos=[], links=[], table=None, empty=No
attrs.append('arraysize="%s"' % field['arraysize'])

if 'datatype' in field:
if field['datatype'] in ['char', 'unsignedByte', 'short', 'int', 'long', 'float', 'double']:
if field['datatype'] in ['boolean', 'char', 'unsignedByte', 'short', 'int', 'long', 'float', 'double']:
attrs.append('datatype="%s"' % field['datatype'])
else:
attrs.append('xtype="%s"' % field['datatype'])
Expand Down

0 comments on commit 2552980

Please sign in to comment.