Skip to content

Commit 3f3ef2a

Browse files
committed
Fix open and current redirects
They were not taking draft commitfests into account.
1 parent cbcb76b commit 3f3ef2a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pgcommitfest/commitfest/views.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,17 @@ def activity(request, cfid=None, rss=None):
231231

232232
def redir(request, what, end):
233233
if what == "open":
234-
cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_OPEN))
234+
cfs = list(
235+
CommitFest.objects.filter(status=CommitFest.STATUS_OPEN, draft=False)
236+
)
235237
elif what == "inprogress":
236238
cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_INPROGRESS))
237239
elif what == "current":
238240
cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_INPROGRESS))
239241
if len(cfs) == 0:
240-
cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_OPEN))
242+
cfs = list(
243+
CommitFest.objects.filter(status=CommitFest.STATUS_OPEN, draft=False)
244+
)
241245
else:
242246
raise Http404()
243247

0 commit comments

Comments
 (0)