File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -98,4 +98,10 @@ def projects(
9898 ) -> QuerySet [Project ]:
9999 if include_all :
100100 return Project .objects .all ()
101- return Project .objects .exclude (status__in = [Project .Status .ARCHIVED , Project .Status .DISCARDED ]).all ()
101+ return Project .objects .filter (
102+ status__in = [
103+ Project .Status .READY ,
104+ Project .Status .PUBLISHED ,
105+ Project .Status .PAUSED ,
106+ ],
107+ ).all ()
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ class Query:
5757 credits
5858 }
5959 }
60- query Projects($pagination: OffsetPaginationInput) {
61- projects(order: {id: ASC}, pagination: $pagination) {
60+ query Projects($pagination: OffsetPaginationInput, $includeAll: Boolean = false ) {
61+ projects(order: {id: ASC}, pagination: $pagination, includeAll: $includeAll ) {
6262 totalCount
6363 pageInfo {
6464 offset
@@ -305,6 +305,7 @@ def _query():
305305 "limit" : 10 ,
306306 "offset" : 0 ,
307307 },
308+ "includeAll" : True ,
308309 },
309310 )
310311
Original file line number Diff line number Diff line change @@ -29,4 +29,4 @@ def tutorials(
2929 ) -> QuerySet [Tutorial ]:
3030 if include_all :
3131 return Tutorial .objects .all ()
32- return Tutorial .objects .exclude ( status__in = [ Tutorial .Status .ARCHIVED , Tutorial . Status . DISCARDED ] ).all ()
32+ return Tutorial .objects .filter ( status = Tutorial .Status .PUBLISHED ).all ()
You can’t perform that action at this time.
0 commit comments