auth.enable_record_versioning(db)
which seems to work as expected. When I add any common_filter to a versioned table, such as the simple one below:
common_filter = lambda query: db.property_detail.is_active == True,
I get this traceback:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11. Traceback (most recent call last):
File "/home/jose/python-environments/web2py-trunk/web2py/gluon/restricted.py", line 224, in restricted
exec ccode in environment
File "/home/jose/python-environments/web2py-trunk/web2py/applications/propman/models/2_propman_tables.py", line 320, in <module>
auth.enable_record_versioning(db)
File "/home/jose/python-environments/web2py-trunk/web2py/gluon/tools.py", line 1716, in enable_record_versioning
current_record_label=current_record_label)
File "/home/jose/python-environments/web2py-trunk/web2py/gluon/dal/objects.py", line 431, in _enable_record_versioning
newquery = query & newquery
TypeError: unsupported operand type(s) for &: 'function' and 'function'
Can anyone else confirm this behaviour? I'll file a bug report if it is confirmed that it isn't just me.
web2py versions tested: 2.9.5, and latest trunk = Version 2.9.12-beta+timestamp.2015.01.07.05.06.34
Regards,
Jose
uhm....but record_versioning adds a common_filter per se, and is usually on the form of is_active == True. Did you try to set a different common_filter ?
Hi,I've fixed the error but I've to understand if all common_filters are applied correctly.
Do you mind to test https://github.com/ilvalle/web2py/tree/issue-2023 ?
Do you mind to test https://github.com/ilvalle/web2py/tree/issue-2023 ?
--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/mohm6Nb8Mfc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.