From 52e09e775b86d44d346ae4519863f18e4c00da1a Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Fri, 5 Mar 2010 07:22:03 +0000 Subject: [PATCH] Make SQLCatalog an ActiveObject, yet in a way which does not require to depend on CMFActivity. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33422 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/SQLCatalog.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index cecf1b7f60..d50e74561d 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2002-2009 Nexedi SARL. All Rights Reserved. @@ -53,6 +54,13 @@ from zope.interface import implements from SearchText import isAdvancedSearchText +# Try to import ActiveObject in order to make SQLCatalog active +try: + from Products.CMFActivity.ActiveObject import ActiveObject +except ImportError: + ActiveObject = ExtensionClass.Base + + PROFILING_ENABLED = False if PROFILING_ENABLED: from tiny_profiler import profiler_decorator, profiler_report, profiler_reset @@ -233,7 +241,7 @@ related_key_warned_column_set = set() class Catalog(Folder, Persistent, Acquisition.Implicit, - ExtensionClass.Base, + ActiveObject, OFS.History.Historical): """ An Object Catalog -- 2.30.9