I opened a pydal ticket
On Tuesday, 7 June 2016 05:51:05 UTC-5, arihant daga wrote:
>
> I think there is this bug in web2py.
>
> I had this in my code for users table.
>
> Field('created_on', 'datetime',
> default=request.utcnow,update=request.utcnow)
>
> but on submitting signup form it always threw an error saying
> combine() argument 1 must be datetime.date, not str
> i checked arguments and found this-
> *web2py\gluon\packages\dal\pydal\adapters\mongo.py in insert at line 938*
> {'created_on': None, 'email': u'[email protected]', 'first_name': u'',
> 'gender': u'', 'mobile': u'', 'password':
> u'pbkdf2(1000,20,sha512)$b743ac142d5867d0$ef23b7b5dd784d951572bdb6d8b944b8b1b9f40d',
>
> 'registration_id': u'', 'reset_password_key': u'', 'user_type': False}
>
> web2py is sending None for created_on. field. So i removed Field type from
> created_on and replace my code with this
> Field('created_on',default=request.utcnow,update=request.utcnow).
> And it worked fine. I think there is some issue with datetime validator
> itself.
>
>
> Thanks.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.