[web2py] Re: list:reference, multiple=True, validation error

2016-03-09 Thread villas
I just saw that issue no. 1203 has been addressed by a new commit.  
I did a quick test and the bug seems to have been resolved.  
Many 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-09 Thread villas
On Tuesday, 8 March 2016 18:12:07 UTC, Leonel Câmara wrote:
>
> Do you have multiple=True as a keyword argument to your IS_IN_DB validator?
>

My entire test code is as stated in this thread.  I invite anyone who 
wishes to reproduce the bug to use that code.  Make sure your web2py is 
using the latest cutting-edge source.

Note:  the field type list:reference does have a default validator and my 
code simply uses that default.  According to the book,  the default is:  
IS_IN_DB(db,table.field,format,multiple=True)

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-08 Thread Leonel Câmara
Do you have multiple=True as a keyword argument to your IS_IN_DB validator?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-08 Thread villas
As I would like to get this fixed (and cannot do so myself),  I raised this 
as an issue on Github (issue 1203 
) where I hope someone will 
be able to look at it.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-07 Thread villas
Could someone please assist to resolve this bug?   I am not sure what to do 
to fix it.  

Please note that this bug is in the latest source.  I believe that it is in 
the IS_IN_DB validator. 

Thanks to anyone who might be able to help.  To replicate,  please do this:


> 1. Make a new app.
> 2. Paste this at the bottom of models/db.py
>
>
> db.define_table('tag',
> Field('name'),
> Field('descr',length=50),
> format='%(name)s',
> )
> 
> db.define_table('docstore',
> Field('name'),
> Field('tags','list:reference tag'), 
> )   
> 
> if not db(db.tag.id>0).count():
> db.tag.insert( name = "A",  descr = "A Descr" ) 
> db.tag.insert( name = "B",  descr = "B Descr" ) 
> db.tag.insert( name = "C",  descr = "C Descr" ) 
>
>
> Use Appadmin to add a record to docstore table.
>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-04 Thread villas
Did you update to latest Web2py?  I mean 'git pull'. 

On Friday, 4 March 2016 14:40:37 UTC, eric cuver wrote:
>
> I  teste it on my web2py  it work 
>
> Le vendredi 4 mars 2016 15:24:39 UTC+1, villas a écrit :
>>
>> Hi Eric,  Thanks for your interest.  I believe that this is a bug in 
>> IS_IN_DB validator.  I am surprised that more users have not reported it.   
>> Try this to replicate.
>>
>> 1. Make a new app.
>> 2. Paste this at the bottom of models/db.py
>>
>>
>> db.define_table('tag',
>> Field('name'),
>> Field('descr',length=50),
>> format='%(name)s',
>> )
>> 
>> db.define_table('docstore',
>> Field('name'),
>> Field('tags','list:reference tag'), 
>> )   
>> 
>> if not db(db.tag.id>0).count():
>> db.tag.insert( name = "A",  descr = "A Descr" ) 
>> db.tag.insert( name = "B",  descr = "B Descr" ) 
>> db.tag.insert( name = "C",  descr = "C Descr" ) 
>>
>>
>> Use Appadmin to add a record to docstore table.
>>
>>
>>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-04 Thread eric cuver
I  teste it on my web2py  it work 

Le vendredi 4 mars 2016 15:24:39 UTC+1, villas a écrit :
>
> Hi Eric,  Thanks for your interest.  I believe that this is a bug in 
> IS_IN_DB validator.  I am surprised that more users have not reported it.   
> Try this to replicate.
>
> 1. Make a new app.
> 2. Paste this at the bottom of models/db.py
>
>
> db.define_table('tag',
> Field('name'),
> Field('descr',length=50),
> format='%(name)s',
> )
> 
> db.define_table('docstore',
> Field('name'),
> Field('tags','list:reference tag'), 
> )   
> 
> if not db(db.tag.id>0).count():
> db.tag.insert( name = "A",  descr = "A Descr" ) 
> db.tag.insert( name = "B",  descr = "B Descr" ) 
> db.tag.insert( name = "C",  descr = "C Descr" ) 
>
>
> Use Appadmin to add a record to docstore table.
>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-04 Thread villas
Hi Eric,  Thanks for your interest.  I believe that this is a bug in 
IS_IN_DB validator.  I am surprised that more users have not reported it.   
Try this to replicate.

1. Make a new app.
2. Paste this at the bottom of models/db.py


db.define_table('tag',
Field('name'),
Field('descr',length=50),
format='%(name)s',
)

db.define_table('docstore',
Field('name'),
Field('tags','list:reference tag'), 
)   

if not db(db.tag.id>0).count():
db.tag.insert( name = "A",  descr = "A Descr" ) 
db.tag.insert( name = "B",  descr = "B Descr" ) 
db.tag.insert( name = "C",  descr = "C Descr" ) 


Use Appadmin to add a record to docstore table.


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: list:reference, multiple=True, validation error

2016-03-04 Thread eric cuver

you can paste your code ?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.