Can you try print or log request.args?

On Thursday, 27 September 2012 11:51:21 UTC-5, Alec Taylor wrote:
>
> Given the model:
>
> db.define_table(
>     'choice_list',
>     Field('choice', notnull=True, default='Yes', requires=IS_IN_SET(['Yes', 
> 'Maybe', 'No'])))
>
>
> With the controllers:
>
> @service.jsondef get_choices():
>     return db(db.choice_list).select(db.choice_list.choice)
>
> @service.jsondef push_choice(): # also tried with arg here
>     return db.choice_list.validate_and_insert(choice=str(request.args(2)))
>
>
> On the call:
> http://localhost/call/json/push_choice/Yes
>
> I get the error:
> <class 'sqlite3.IntegrityError'> choice_list.choose may not be NULLAny 
> recommendations would be appreciated,
>
> Alec Taylor
>

-- 



Reply via email to