IS_IN_DB always applies the common_filter even when I ask it not to (FIXED)

15 views
Skip to first unread message

Andrew Rogers

unread,
Oct 6, 2020, 2:03:01 AM10/6/20
to web2py-users
FYI I was trying to disable the common filter on a table that was used in the IS_IN_DB validator. I tried a few options:

IS_IN_DB(db, 'Organisation.id', ignore_common_filters=True)
and 
IS_IN_DB(db(db.Organisation.id>=0, ignore_common_filters=True)

The former should work for IS_NOT_IN_DB but it didn't work for IS_IN_DB

Anyhow, I had a look at pydal to see if i could work out what was going on. It seems it simply wasn't implemented so I have made some minor changes which has things working for me.  You can find them here: https://github.com/web2py/pydal/pull/642 

It is possible that i was going about this the wrong way so if there is a different way i should have been doing this please let me know.

Cheers
Andrew
Reply all
Reply to author
Forward
0 new messages