|
@@ -735,7 +735,10 @@ class ContentApi(object):
|
735
|
735
|
assert content_type is not None# DYN_REMOVE
|
736
|
736
|
assert isinstance(content_type, str) # DYN_REMOVE
|
737
|
737
|
|
738
|
|
- resultset = self._base_query(workspace).order_by(desc(Content.updated))
|
|
738
|
+ resultset = self._base_query(workspace) \
|
|
739
|
+ .filter(Content.workspace_id == Workspace.workspace_id) \
|
|
740
|
+ .filter(Workspace.is_deleted.is_(False)) \
|
|
741
|
+ .order_by(desc(Content.updated))
|
739
|
742
|
|
740
|
743
|
if content_type!=ContentType.Any:
|
741
|
744
|
resultset = resultset.filter(Content.type==content_type)
|
|
@@ -773,6 +776,8 @@ class ContentApi(object):
|
773
|
776
|
|
774
|
777
|
not_read_revisions = self._revisions_base_query(workspace) \
|
775
|
778
|
.filter(~ContentRevisionRO.revision_id.in_(read_revision_ids)) \
|
|
779
|
+ .filter(ContentRevisionRO.workspace_id == Workspace.workspace_id) \
|
|
780
|
+ .filter(Workspace.is_deleted.is_(False)) \
|
776
|
781
|
.subquery()
|
777
|
782
|
|
778
|
783
|
not_read_content_ids_query = DBSession.query(
|