Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1c804ebf
Commit
1c804ebf
authored
Feb 01, 2005
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migration for CMF indexes added
parent
cbb57740
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+6
-1
No files found.
lib/python/Products/ZCatalog/ZCatalog.py
View file @
1c804ebf
...
...
@@ -908,7 +908,8 @@ class ZCatalog(Folder, Persistent, Implicit):
__len__ changed in Zope 2.8. Pre-Zope 2.7 installation used to implement
__len__ as persistent attribute of the index instance which is totally
incompatible with the new extension class implementation based on new-style
classes.
classes. CMF indexes on date fields will be converted to DateIndex and
DateRangeIndex.
"""
LOG
.
info
(
'Start migration of indexes for %s'
%
self
.
absolute_url
(
1
))
...
...
@@ -925,6 +926,10 @@ class ZCatalog(Folder, Persistent, Implicit):
idx_type
=
idx
.
meta_type
idx_id
=
idx
.
getId
()
LOG
.
info
(
'processing index %s'
%
idx_id
)
if
idx_type
==
'FieldIndex'
and
idx_id
in
(
'start'
,
'modified'
,
'end'
,
'created'
):
idx_type
=
'DateIndex'
if
idx_type
==
'FieldIndex'
and
idx_id
in
(
'effective'
,
'expires'
):
idx_type
=
'DateRangeIndex'
indexed_attrs
=
getattr
(
idx
,
'indexed_attrs'
,
None
)
self
.
delIndex
(
idx
.
getId
())
self
.
addIndex
(
idx_id
,
idx_type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment