Skip to content

Commit

Permalink
[bugfix][noticket] Activity streams fail if the object has no id prop…
Browse files Browse the repository at this point in the history
…erty
  • Loading branch information
amercader committed Feb 21, 2012
1 parent 89cc181 commit cb0a41c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/lib/activity.py
Expand Up @@ -92,6 +92,12 @@ def before_commit(self, session):
objects = object_cache[activity_type]
for obj in objects:
logger.debug("Looking at %s object %s" % (activity_type, obj))

if not hasattr(obj,"id"):
logger.debug("Object has no id, skipping...")
continue


if activity_type == "new" and obj.id in activities:
logger.debug("This object was already logged as a new "
"package")
Expand Down

0 comments on commit cb0a41c

Please sign in to comment.