Skip to content

Commit

Permalink
fix 500s
Browse files Browse the repository at this point in the history
  • Loading branch information
Her Email authored and alphatownsman committed Dec 13, 2023
1 parent 9f84f60 commit 49c59ea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion catalog/jobs/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@JobManager.register
class DiscoverGenerator(BaseJob):
interval = timedelta(hours=3)
interval = timedelta(hours=2)

def get_popular_marked_item_ids(self, category, days, exisiting_ids):
item_ids = [
Expand Down
3 changes: 2 additions & 1 deletion mastodon/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,10 @@ def share_mark(mark):
if user.preference.mastodon_append_tag
else ""
)
site = MastodonApplication.objects.filter(domain_name=user.mastodon_site).first()
stars = rating_to_emoji(
mark.rating_grade,
MastodonApplication.objects.get(domain_name=user.mastodon_site).star_mode,
site.star_mode if site else 0,
)
content = f"{mark.action_label}{mark.item.display_title}{stars}\n{mark.item.absolute_url}\n{mark.comment_text or ''}{tags}"
update_id = None # get_status_id_by_url(mark.shared_link)
Expand Down
1 change: 1 addition & 0 deletions mastodon/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@JobManager.register
class MastodonSiteCheck(BaseJob):
interval = timedelta(days=1)
max_unreachable_days = 31

def run(self):
Expand Down
2 changes: 1 addition & 1 deletion social/templates/feed_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<a href="{{ activity.owner.url }}" class="nickname">{{ activity.owner.display_name }}</a>
</span>
<span>
<a href="{{ activity.owner.url }}" class="handler">{{ activity.owner.handler }}</a>
<a href="{{ activity.owner.url }}" class="handler">{{ activity.owner.full_handle }}</a>
</span>
</div>
{% with "activity/"|add:activity.template|add:".html" as template %}
Expand Down
2 changes: 1 addition & 1 deletion takahe/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_follower_ids(identity_pk: int):
@staticmethod
def get_following_request_ids(identity_pk: int):
targets = Follow.objects.filter(
source_id=identity_pk, state="pending_approval"
source_id=identity_pk, state__in=["unrequested", "pending_approval"]
).values_list("target", flat=True)
return list(targets)

Expand Down

0 comments on commit 49c59ea

Please sign in to comment.