[ckan-changes] [okfn/ckan] de89c9: Fix activity streams when no user logged in

noreply at github.com noreply at github.com
Tue Dec 13 17:58:57 UTC 2011


  Branch: refs/heads/feature-1515-activity-streams
  Home:   https://github.com/okfn/ckan

  Commit: de89c9e87444966f6e6ed6e6218aa05ca1a6a4e4
      https://github.com/okfn/ckan/commit/de89c9e87444966f6e6ed6e6218aa05ca1a6a4e4
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2011-12-13 (Tue, 13 Dec 2011)

  Changed paths:
    M ckan/lib/activity.py
  M ckan/model/package.py
  M ckan/tests/models/test_activity.py

  Log Message:
  -----------
  Fix activity streams when no user logged in

Still get the user's ID from the revision, but fall back on 'not logged
in' if there is no user object in the revision. Put this logic in
lib.activity.

Add user_id param to lib.activity.activity_stream_item() and
model.package.Package.activity_stream_item().

Add a debug message when we skip an SQLAlchemy commit because it has no
_object_cache or no revision.

Add test cases for adding and updating packages and resources when not logged in.






More information about the ckan-changes mailing list