replace if-cases to annotate
This commit is contained in:
@@ -250,11 +250,7 @@ def __next(post=None, public=True):
|
||||
d = post.slug
|
||||
|
||||
if post:
|
||||
# TODO: bad implementation but it works!!
|
||||
if post.post_type == "N" or post.post_type == "E":
|
||||
posts = Post.articles.date_sorted_list(public)
|
||||
elif post.post_type == "F":
|
||||
posts = FetMeeting.objects.published(public)
|
||||
posts = Post.objects.date_sorted_list(public).filter(post_type=post.post_type)
|
||||
|
||||
if posts:
|
||||
for k, v in enumerate(posts):
|
||||
|
||||
Reference in New Issue
Block a user