Permalink
Browse files

Added a fix for #985

Fixes #985
Fixes #991
  • Loading branch information...
Jonas Obrist
Jonas Obrist committed Sep 5, 2011
1 parent 73941bb commit f573a24e4728070a806eeae3277a1dc036b53b25
Showing with 10 additions and 1 deletion.
  1. +10 −1 cms/models/pagemodel.py
View
@@ -959,7 +959,16 @@ def get_previous_filtered_sibling(self, **filters):
'%s__lt' % opts.right_attr: getattr(self, opts.left_attr),
})
order_by = '-%s' % opts.right_attr
-
+
+ # publisher stuff
+ filters.update({
+ 'publisher_is_draft': self.publisher_is_draft
+ })
+ # multisite
+ filters.update({
+ 'site__id': self.site_id
+ })
+
sibling = None
try:
sibling = self._tree_manager.filter(**filters).order_by(order_by)[0]

0 comments on commit f573a24

Please sign in to comment.