diff options
Diffstat (limited to 'wqflask/base/trait.py')
-rwxr-xr-x | wqflask/base/trait.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index f333d5a7..7847c0a6 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -30,7 +30,7 @@ class GeneralTrait(object): def __init__(self, **kw): # xor assertion - assert bool(kw.get('dataset')) != bool(kw.get('dataset_name')), "Needs dataset ob. xor name"; + assert bool(kw.get('dataset')) != bool(kw.get('dataset_name')), "Needs dataset ob. or name"; if kw.get('dataset_name'): self.dataset = create_dataset(kw.get('dataset_name')) else: @@ -310,7 +310,7 @@ class GeneralTrait(object): #XZ: assign SQL query result to trait attributes. for i, field in enumerate(self.dataset.display_fields): - setattr(self, field, traitInfo[i]) + setattr(self, field, str(traitInfo[i])) if self.dataset.type == 'Publish': self.confidential = 0 |