Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only add message if a result is returned

  • Loading branch information...
commit 4537c3d54693b22ecbb4417cabc2150b3860197b 1 parent 2c27c10
@paltman paltman authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 reminders/templatetags/reminders_tags.py
View
10 reminders/templatetags/reminders_tags.py
@@ -48,10 +48,12 @@ def render(self, context):
url = None
if settings.REMINDERS[label].get("dismissable", True):
url = reverse("reminders_dismiss", kwargs={"label": label})
- reminders.append({
- "message": mark_safe(message % test(request.user)),
- "dismiss_url": url
- })
+ result = test(request.user)
+ if result:
+ reminders.append({
+ "message": mark_safe(message % test(request.user)),
+ "dismiss_url": url
+ })
context[self.as_var] = reminders
return ""
Please sign in to comment.
Something went wrong with that request. Please try again.