diff --git a/catalog/jobs/discover.py b/catalog/jobs/discover.py index 49e8b18a..53216b75 100644 --- a/catalog/jobs/discover.py +++ b/catalog/jobs/discover.py @@ -165,7 +165,7 @@ class DiscoverGenerator(BaseJob): tags = TagManager.popular_tags(days=14, local_only=local)[:40] excluding_identities = Takahe.get_no_discover_identities() - if settings.NEODB_DISCOVER_SHOW_POPULAR_POSTS: + if settings.DISCOVER_SHOW_POPULAR_POSTS: reviews = ( Review.objects.filter(visibility=0) .exclude(owner_id__in=excluding_identities) diff --git a/journal/templates/mark.html b/journal/templates/mark.html index 856ef9df..032775fd 100644 --- a/journal/templates/mark.html +++ b/journal/templates/mark.html @@ -20,7 +20,10 @@
{% csrf_token %} {% if shelf_statuses %} - +
diff --git a/journal/templates/posts.html b/journal/templates/posts.html index 40821d11..73ec5982 100644 --- a/journal/templates/posts.html +++ b/journal/templates/posts.html @@ -7,7 +7,8 @@
- @{{ post.author.handle }} + @{{ post.author.handle }}
diff --git a/journal/views/mark.py b/journal/views/mark.py index 86a86f1e..595ded6d 100644 --- a/journal/views/mark.py +++ b/journal/views/mark.py @@ -66,7 +66,12 @@ def mark(request: AuthedHttpRequest, item_uuid): visibility = int(request.POST.get("visibility", default=0)) rating_grade = request.POST.get("rating_grade", default=0) rating_grade = int(rating_grade) if rating_grade else None - status = ShelfType(request.POST.get("status", "wishlist")) + _status = request.POST.get("status", "wishlist") + try: + status = ShelfType(_status) + except Exception: + logger.error(f"unknown shelf: {_status}") + status = ShelfType.WISHLIST text = request.POST.get("text") tags = request.POST.get("tags") tags = tags.split(",") if tags else [] diff --git a/takahe/models.py b/takahe/models.py index 17f53dcc..d358e7da 100644 --- a/takahe/models.py +++ b/takahe/models.py @@ -753,6 +753,16 @@ class Identity(models.Model): identity=target, subject_identity=self, type=type, **kwargs ) + def local_icon_url(self): + if self.local: + return ( + self.icon.url + if self.icon + else self.icon_uri or settings.SITE_INFO["user_icon"] + ) + else: + return f"/proxy/identity_icon/{self.pk}/" + class Follow(models.Model): """