Skip to content

Commit

Permalink
Support enums with no labels. Fixes #31.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmafc committed Jun 22, 2012
1 parent 785b184 commit 86dd5db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyrseas/dbobject/dbtype.py
Expand Up @@ -240,6 +240,8 @@ def _from_catalog(self):
elif kind == 'e':
del dbtype.type
self[(sch, typ)] = Enum(**dbtype.__dict__)
if not hasattr(self[(sch, typ)], 'labels'):
self[(sch, typ)].labels = {}
elif kind == 'c':
del dbtype.type
self[(sch, typ)] = Composite(**dbtype.__dict__)
Expand Down

0 comments on commit 86dd5db

Please sign in to comment.