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
d2450e66
Commit
d2450e66
authored
Oct 15, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more checks for _length attribute
parent
819920c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
lib/python/Products/ZCatalog/Catalog.py
lib/python/Products/ZCatalog/Catalog.py
+4
-0
No files found.
lib/python/Products/ZCatalog/Catalog.py
View file @
d2450e66
...
@@ -339,6 +339,8 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
...
@@ -339,6 +339,8 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
if
index
is
None
:
# we are inserting new data
if
index
is
None
:
# we are inserting new data
index
=
self
.
updateMetadata
(
object
,
uid
)
index
=
self
.
updateMetadata
(
object
,
uid
)
if
not
hasattr
(
self
,
'_length'
):
self
.
migrate__len__
()
self
.
_length
.
change
(
1
)
self
.
_length
.
change
(
1
)
self
.
uids
[
uid
]
=
index
self
.
uids
[
uid
]
=
index
self
.
paths
[
index
]
=
uid
self
.
paths
[
index
]
=
uid
...
@@ -389,6 +391,8 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
...
@@ -389,6 +391,8 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
del
data
[
rid
]
del
data
[
rid
]
del
paths
[
rid
]
del
paths
[
rid
]
del
uids
[
uid
]
del
uids
[
uid
]
if
not
hasattr
(
self
,
'_length'
):
self
.
migrate__len__
()
self
.
_length
.
change
(
-
1
)
self
.
_length
.
change
(
-
1
)
else
:
else
:
...
...
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