diff --git a/boards/models/post.py b/boards/models/post.py
--- a/boards/models/post.py
+++ b/boards/models/post.py
@@ -237,7 +237,8 @@ class PostManager(models.Manager):
if not post.is_opening():
thread = et.SubElement(content_tag, TAG_THREAD)
- thread.text = str(post.get_thread().get_opening_post_id())
+ thread_id = et.SubElement(thread, TAG_ID)
+ post.get_thread().get_opening_post().global_id.to_xml_element(thread_id)
else:
# TODO Output tags here
pass
diff --git a/boards/tests/test_keys.py b/boards/tests/test_keys.py
--- a/boards/tests/test_keys.py
+++ b/boards/tests/test_keys.py
@@ -67,14 +67,16 @@ class KeyTest(TestCase):
'