From e7a0c261be4fb7675ad499b922f0e53e796357c8 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 15 Feb 2020 12:35:54 -0800 Subject: [PATCH] Fixes review display in feed (set local type) --- fedireads/models/activity.py | 1 + fedireads/templatetags/fr_display.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fedireads/models/activity.py b/fedireads/models/activity.py index 855637f59..30fcbfc07 100644 --- a/fedireads/models/activity.py +++ b/fedireads/models/activity.py @@ -49,6 +49,7 @@ class ReviewActivity(Activity): def save(self, *args, **kwargs): self.activity_type = 'Article' + self.fedireads_type = 'Review' super().save(*args, **kwargs) diff --git a/fedireads/templatetags/fr_display.py b/fedireads/templatetags/fr_display.py index 9beec01dc..518192097 100644 --- a/fedireads/templatetags/fr_display.py +++ b/fedireads/templatetags/fr_display.py @@ -13,7 +13,7 @@ def stars(number): ''' turn integers into stars ''' try: number = int(number) - except TypeError: + except (ValueError, TypeError): number = 0 return ('★' * number) + '☆' * (5 - number)