Skip to content

Commit

Permalink
Don't complain about brains in reference_catalog where getObject retu…
Browse files Browse the repository at this point in the history
…rns None.

This happens for content without apparent problems.
  • Loading branch information
mauritsvanrees committed Feb 25, 2017
1 parent bd27171 commit 4431273
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -5,7 +5,8 @@ Changelog
1.7 (unreleased)
----------------

- Nothing changed yet.
- Don't complain about brains in ``reference_catalog`` where ``getObject`` returns None.
This happens for content without apparent problems. [maurits]


1.6 (2016-08-23)
Expand Down
4 changes: 4 additions & 0 deletions collective/catalogcleanup/browser.py
Expand Up @@ -162,6 +162,10 @@ def check_references(self, catalog_id='reference_catalog'):
# cleaned up by one of the other methods already.
ref_errors += 1
continue
if ref is None:
# No error, but no object either. This can happen
# for references. Let's accept it.
continue
for getter in getters:
obj = self.get_object_or_status(ref, getter)
if not isinstance(obj, basestring):
Expand Down

0 comments on commit 4431273

Please sign in to comment.