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 @@ -235,7 +235,7 @@ class SyncManager: models = et.SubElement(response, TAG_MODELS) - for post in Post.objects.all(): + for post in Post.objects.prefetch_related('global_id').all(): tag_id = et.SubElement(models, TAG_ID) post.global_id.to_xml_element(tag_id)