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
3af78da2
Commit
3af78da2
authored
Jun 28, 2005
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manage_convertIndexes did not handle DateRangeIndexes properly
parent
0f2f0447
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+13
-2
No files found.
doc/CHANGES.txt
View file @
3af78da2
...
...
@@ -49,6 +49,8 @@ Zope Changes
- Collector #1808: manage_convertIndexes no longer tries to change the
index types causing some trouble with CMF.
- manage_convertIndexes did not treat DateRangeIndexes properly
Zope 2.8.0 (2005/06/11)
Bugs Fixed
...
...
lib/python/Products/ZCatalog/ZCatalog.py
View file @
3af78da2
...
...
@@ -917,8 +917,7 @@ 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. CMF indexes on date fields will be converted to DateIndex and
DateRangeIndex.
classes.
"""
LOG
.
info
(
'Start migration of indexes for %s'
%
self
.
absolute_url
(
1
))
...
...
@@ -935,12 +934,24 @@ class ZCatalog(Folder, Persistent, Implicit):
idx_type
=
idx
.
meta_type
idx_id
=
idx
.
getId
()
LOG
.
info
(
'processing index %s'
%
idx_id
)
indexed_attrs
=
getattr
(
idx
,
'indexed_attrs'
,
None
)
if
idx
.
meta_type
==
'DateRangeIndex'
:
since_field
=
getattr
(
idx
,
'_since_field'
,
None
)
until_field
=
getattr
(
idx
,
'_until_field'
,
None
)
self
.
delIndex
(
idx
.
getId
())
self
.
addIndex
(
idx_id
,
idx_type
)
new_idx
=
self
.
Indexes
[
idx_id
]
if
indexed_attrs
:
setattr
(
new_idx
,
'indexed_attrs'
,
indexed_attrs
)
if
idx
.
meta_type
==
'DateRangeIndex'
:
setattr
(
new_idx
,
'_since_field'
,
since_field
)
setattr
(
new_idx
,
'_until_field'
,
until_field
)
self
.
manage_reindexIndex
(
idx_id
,
REQUEST
)
self
.
_migrated_280
=
True
...
...
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