Oops. Correction:

    str(field.type)[:10]

2010/12/27 Branko Vukelić <stu...@brankovukelic.com>:
> Have you tried ``str(field.type[:10])``? Just a wild guess. I think
> just saying ``field.type[:10]`` would actually return a class
> instance, not a string.
>
> On Mon, Dec 27, 2010 at 2:05 AM, David J. <da...@styleflare.com> wrote:
>> Thanks for the Tips;
>>
>> Does this have sqlite have some sort of limitations?
>>
>> I seem to get this exception;
>>
>> Traceback (most recent call last):
>>   File "/Users/book/Desktop/python-projects/web2py/gluon/restricted.py",
>> line 188, in restricted
>>     exec ccode in environment
>>   File
>> "/Users/book/Desktop/python-projects/web2py/applications/app/models/db.py",
>> line 97, in <module>
>>     Field('updated_at','datetime',default=request.now,update=request.now),)
>>   File "/Users/book/Desktop/python-projects/web2py/gluon/dal.py", line 3321,
>> in define_table
>>     polymodel=polymodel)
>>   File "/Users/book/Desktop/python-projects/web2py/gluon/dal.py", line 410,
>> in create_table
>>     elif field.type[:10] == 'reference ':
>> TypeError: 'NoneType' object is unsubscriptable
>>
>> ERROR SNAPSHOT
>> <type 'exceptions.TypeError'>('NoneType' object is unsubscriptable)
>>
>>
>>
>> On 12/26/10 6:19 PM, Bruno Rocha wrote:
>>
>> db.auth_user, default=auth.user_id
>>
>
>
>
> --
> Branko Vukelic
>
> stu...@brankovukelic.com
> http://www.brankovukelic.com/
>



-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/

Reply via email to