diff --git a/boards/models/post/manager.py b/boards/models/post/manager.py --- a/boards/models/post/manager.py +++ b/boards/models/post/manager.py @@ -129,7 +129,8 @@ class PostManager(models.Manager): @transaction.atomic def import_post(self, title: str, text: str, pub_time: str, global_id, - opening_post=None, tags=list(), files=list()): + opening_post=None, tags=list(), files=list(), + tripcode=None): is_opening = opening_post is None if is_opening: thread = boards.models.thread.Thread.objects.create( @@ -144,7 +145,7 @@ class PostManager(models.Manager): last_edit_time=pub_time, global_id=global_id, opening=is_opening, - thread=thread) + thread=thread, tripcode=tripcode) # TODO Add files for file in files: 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 @@ -177,6 +177,7 @@ class SyncManager: title = tag_content.find(TAG_TITLE).text or '' text = tag_content.find(TAG_TEXT).text or '' pub_time = tag_content.find(TAG_PUB_TIME).text + tripcode = tag_content.find(TAG_TRIPCODE).text thread = tag_content.find(TAG_THREAD) tags = [] @@ -218,7 +219,7 @@ class SyncManager: Post.objects.import_post( title=title, text=text, pub_time=pub_time, opening_post=opening_post, tags=tags, - global_id=global_id, files=files) + global_id=global_id, files=files, tripcode=tripcode) else: raise SyncException(EXCEPTION_NODE.format(tag_status.text))