1. Daniel Greenfeld
  2. transifex

Commits

Diego Búrigo Zacarão  committed 421a9a1

No 404 should be raised when adding an ActionLog

- An exception must be raised if something goes wrong.

  • Participants
  • Parent commits 94976da
  • Branches default

Comments (0)

Files changed (1)

File transifex/actionlog/models.py

View file
  • Ignore whitespace
 from django.utils.translation import ugettext_lazy as _
 from django.utils.encoding import smart_unicode
 from django.utils.encoding import force_unicode
-from django.shortcuts import get_object_or_404
 from django.template import loader, Context, TemplateDoesNotExist
 from django.utils.translation import get_language, activate
 from notification.models import NoticeType
     if message is None:
         message = _get_formatted_message(action_type, context)
 
-    action_type_obj = get_object_or_404(NoticeType, label=action_type)
+    action_type_obj = NoticeType.objects.get(label=action_type)
 
     time = datetime.datetime.now()