Skip to content
Browse files

fixed a bunch of snafus

git-svn-id: http://django-notification.googlecode.com/svn/trunk@46 590c3fc9-4838-0410-bb95-17a0c9b37ca9
  • Loading branch information...
1 parent c8ca15c commit 5dd5011354b4cda71bdfb53ba3e689dc6b9a24d1 @jtauber jtauber committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 notification/models.py
View
6 notification/models.py
@@ -68,10 +68,12 @@ class Meta:
def get_notification_setting(user, notice_type, medium):
try:
- return NoticeSetting.objects.get(user=request.user, notice_type=notice_type, medium=medium_id)
+ return NoticeSetting.objects.get(user=user, notice_type=notice_type, medium=medium)
except NoticeSetting.DoesNotExist:
- default = (NOTICE_MEDIA_DEFAULT[medium] <= notice_type.default)
+ default = (NOTICE_MEDIA_DEFAULTS[medium] <= notice_type.default)
setting = NoticeSetting(user=user, notice_type=notice_type, medium=medium, send=default)
+ setting.save()
+ return setting
def should_send(user, notice_type, medium):

0 comments on commit 5dd5011

Please sign in to comment.
Something went wrong with that request. Please try again.