# HG changeset patch # User neko259 # Date 2017-10-14 14:29:49 # Node ID 42e6fbb66deb47ea7a33dfc12edeaf0651155a74 # Parent 8de7e7bd1f54dce198433b0d6d8f99ea205cbb10 Fixed posting a message without sticker diff --git a/boards/models/attachment/__init__.py b/boards/models/attachment/__init__.py --- a/boards/models/attachment/__init__.py +++ b/boards/models/attachment/__init__.py @@ -55,7 +55,10 @@ class AttachmentManager(models.Manager): return attachment def get_by_alias(self, name): - return AttachmentSticker.objects.get(name=name).attachment + try: + return AttachmentSticker.objects.get(name=name).attachment + except AttachmentSticker.DoesNotExist: + return None def _compare_chunks(self, chunks1, chunks2): """