minor fix
This commit is contained in:
parent
6b6c32882b
commit
d1ddd65df6
3 changed files with 5 additions and 4 deletions
|
@ -49,7 +49,9 @@ class WrappedView(LoginRequiredMixin, TemplateView):
|
|||
def get_context_data(self, **kwargs):
|
||||
user: User = self.request.user # type: ignore
|
||||
target = user.identity
|
||||
year = kwargs.get("year")
|
||||
year = int(kwargs.get("year", 0))
|
||||
if year < 1970 or year > 2100:
|
||||
year = 2000
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["identity"] = target
|
||||
cnt = {}
|
||||
|
|
|
@ -562,7 +562,7 @@ def share_mark(mark, post_as_new=False):
|
|||
site.star_mode if site else 0,
|
||||
)
|
||||
spoiler_text, txt = get_spoiler_text(mark.comment_text or "", mark.item)
|
||||
content = f"{mark.action_label}《{mark.item.display_title}》{stars}\n{mark.item.absolute_url}\n{txt}{tags}"
|
||||
content = f"{mark.action_label_for_feed}《{mark.item.display_title}》{stars}\n{mark.item.absolute_url}\n{txt}{tags}"
|
||||
update_id = (
|
||||
None
|
||||
if post_as_new
|
||||
|
|
|
@ -675,8 +675,7 @@ class Takahe:
|
|||
)
|
||||
stars = _rating_to_emoji(mark.rating_grade, 1)
|
||||
item_link = f"{settings.SITE_INFO['site_url']}/~neodb~{mark.item.url}"
|
||||
action = mark.action_label_for_feed
|
||||
pre_conetent = f'{action} <a href="{item_link}">{mark.item.display_title}</a>'
|
||||
pre_conetent = f'{mark.action_label_for_feed} <a href="{item_link}">{mark.item.display_title}</a>'
|
||||
spoiler, txt = Takahe.get_spoiler_text(mark.comment_text, mark.item)
|
||||
content = f"{stars} \n{txt}\n{tags}"
|
||||
data = {
|
||||
|
|
Loading…
Add table
Reference in a new issue