summaryrefslogtreecommitdiff
path: root/app/posts/models.py
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2020-12-23 10:41:23 -0500
committerlxf <sng@luxagraf.net>2020-12-23 10:41:23 -0500
commit31a9231e7f38553c086784294ccbe4a0a3992279 (patch)
treee9a03c8320c5ff302e2eb1b2bf16fb847d17b99f /app/posts/models.py
parentff338a4f1db71972b0db73bea1158c8b56b5303d (diff)
updated normalize to store the type of post where applicable
Diffstat (limited to 'app/posts/models.py')
-rw-r--r--app/posts/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/posts/models.py b/app/posts/models.py
index 302d278..857b619 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -245,7 +245,7 @@ def cache_gravatar(sender, comment, **kwargs):
@receiver(post_save, sender=Post)
def post_save_events(sender, update_fields, created, instance, **kwargs):
- related, created = RelatedPost.objects.get_or_create(model_name=instance.get_content_type(), entry_id = instance.id, pub_date=instance.pub_date, title=instance.title, slug=instance.slug)
+ related, created = RelatedPost.objects.get_or_create(model_name=instance.get_content_type(), entry_id = instance.id, pub_date=instance.pub_date, title=instance.title, slug=instance.slug, post_type=instance.get_post_type_display())
post_save.disconnect(post_save_events, sender=Post)
instance.save()
post_save.connect(post_save_events, sender=Post)