Massimo,

I did add the line of code you asked me to add. The validator read
like:

db.companyactivity.company.requires=IS_IN_DB(db,db.company.id,'%
(company_name)s')
db.companyactivity.activity.requires=[IS_IN_DB(db,db.activity.id,'%
(activity_name)s'),IS_NOT_IN_DB(db
(db.companyactivity.company==request.vars.company),db.companyactivity.activity)]
tmp=SQLField
('activity',db.activity,requires=db.companyactivity.activity.requires
[0])
tmp._tablename=db.companyactivity.activity._tablename
db.companyactivity.activity.widget=lambda f,v: OptionsWidget.widget
(tmp,v)
db.companyactivity.activity.widget['requires']
=db.companyactivity.activity.requires


The error ticket reads like:

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py",
line 176, in restricted
    exec ccode in environment
  File "/Library/Python/2.5/site-packages/web2py/applications/cms/
models/db.py", line 281, in <module>
    db.bedrijfactiviteit.activiteit.widget['requires']
=db.bedrijfactiviteit.activiteit.requires
TypeError: 'function' object does not support item assignment


Where: db.bedrijfactiviteit.activiteit.widget['requires']
=db.bedrijfactiviteit.activiteit.requires is Dutch for:
db.companyactivity.activity.widget['requires']
=db.companyactivity.activity.requires


Kind regards,

Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to