I have an application which should be used by some organizations. Therefore
I have added

Field('org','reference org', default=lambda:session.org),

and

common_filter = lambda query: db.my_table.org==session.org

to my_table. session.org contails the id of the respective organization.
Great feature,works fine! But using the database administration of the
admin-application the common filter is still active.
There is an "ignore_rw=True" in the admin application and I think I have
read somewhere that there is also an "ignore_common_filters=True".

If session.org is not set, a "database db select" shows strange effects:

   - I can see the first 100 rows.
   - But the message is "0 selected"
   - It is not possible to Update a record


A simple "ignore_common_filters=True" at the appropriate location should
solve the problem. I have taken a quick look at the code, but I think this
statement has to be "very inside", therefore I have no concrete proposal.

Regards, Martin

-- 



Reply via email to