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 @@ -71,7 +71,9 @@ class SyncManager: signatures_tag = et.SubElement(model, TAG_SIGNATURES) post_signatures = post.signature.all() if post_signatures: - signatures = post.signatures + signatures = post_signatures + # TODO Adding signature to a post is not yet added. For now this + # block is useless else: # TODO Maybe the signature can be computed only once after # the post is added? Need to add some on_save signal queue @@ -100,7 +102,7 @@ class SyncManager: for tag_model in tag_models: tag_content = tag_model.find(TAG_CONTENT) - valid = SyncManager.verify_model(tag_content, tag_model) + valid = SyncManager._verify_model(tag_content, tag_model) if not valid: raise Exception('Invalid model signature') @@ -128,6 +130,8 @@ class SyncManager: # TODO Check that the replied posts are already present # before adding new ones + # TODO Get images + post = Post.objects.import_post( title=title, text=text, pub_time=pub_time, opening_post=opening_post) @@ -137,7 +141,7 @@ class SyncManager: pass @staticmethod - def verify_model(tag_content, tag_model): + def _verify_model(tag_content, tag_model): """ Verifies all signatures for a single model. """