Consider the following column definition:
group_name = db.Column(db.Enum('dogs', 'cats', name='device_group'))
Then in my API function I do:
lassie.group_name = userData.group
db.session.add(obj)
db.session.commit()
The problem that even if userData.group
is treated as string in Python. Even if its value is "bird"
, until I actually do the commit operation, I will get no exception.
group_name
as a string and not an enum?