diff --git a/boards/models/post/sync.py b/boards/models/post/sync.py --- a/boards/models/post/sync.py +++ b/boards/models/post/sync.py @@ -16,6 +16,7 @@ EXCEPTION_DOWNLOAD = 'File was not downl EXCEPTION_HASH = 'File hash does not match attachment hash.' EXCEPTION_SIGNATURE = 'Invalid model signature for {}.' EXCEPTION_AUTHOR_SIGNATURE = 'Model {} has no author signature.' +EXCEPTION_THREAD = 'No thread exists for post {}' ENCODING_UNICODE = 'unicode' TAG_MODEL = 'model' @@ -217,7 +218,7 @@ class SyncManager: if exists: opening_post = Post.objects.get(global_id=op_global_id) else: - logger.debug('No thread exists for post {}'.format(global_id)) + raise Exception(EXCEPTION_THREAD.format(global_id)) else: opening_post = None tag_tags = tag_content.find(TAG_TAGS) @@ -375,4 +376,4 @@ class SyncManager: if opening_post: ThreadFilter().add_filter(model, opening_post) - return et.tostring(request, 'unicode') \ No newline at end of file + return et.tostring(request, 'unicode')