diff --git a/__pkginfo__.py b/__pkginfo__.py index 4b93c8ae5ea2e379587f0c373efb5583b49d8020_X19wa2dpbmZvX18ucHk=..b0b42cfa25e3fd47fab085e3db58b1d5962e7f86_X19wa2dpbmZvX18ucHk= 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -67,7 +67,7 @@ ] __depends_cubes__ = {} -__depends__ = {'cubicweb': '>= 3.6.0'} +__depends__ = {'cubicweb': '>= 3.7.3'} __use__ = tuple(__depends_cubes__) # package ### diff --git a/debian/control b/debian/control index 4b93c8ae5ea2e379587f0c373efb5583b49d8020_ZGViaWFuL2NvbnRyb2w=..b0b42cfa25e3fd47fab085e3db58b1d5962e7f86_ZGViaWFuL2NvbnRyb2w= 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Architecture: all Conflicts: erudi-blog, erudi-blog-server, erudi-blog-client, erudi-blog-comp Replaces: erudi-blog, erudi-blog-server, erudi-blog-client, erudi-blog-comp -Depends: cubicweb-common (>= 3.6.0) +Depends: cubicweb-common (>= 3.7.3) Description: blog component for the CubicWeb framework This CubicWeb component provides blogging functionnalities. . diff --git a/hooks.py b/hooks.py index 4b93c8ae5ea2e379587f0c373efb5583b49d8020_aG9va3MucHk=..b0b42cfa25e3fd47fab085e3db58b1d5962e7f86_aG9va3MucHk= 100644 --- a/hooks.py +++ b/hooks.py @@ -1,5 +1,5 @@ -from cubicweb.selectors import implements, score_entity +from cubicweb.selectors import implements, is_in_state from cubicweb.sobjects.notification import NotificationView, StatusChangeMixIn class BlogEntryPublishedView(StatusChangeMixIn, NotificationView): """get notified from published blogs""" @@ -2,10 +2,8 @@ from cubicweb.sobjects.notification import NotificationView, StatusChangeMixIn class BlogEntryPublishedView(StatusChangeMixIn, NotificationView): """get notified from published blogs""" - __select__ = (implements('BlogEntry',) - & score_entity(lambda x: x.latest_trinfo().new_state.name == 'published') - ) + __select__ = implements('BlogEntry',) & is_in_state('published') content_attr = 'content' def subject(self):