mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-22 16:16:39 +00:00
Avoid throwing database error trying to fav unknown statuses
This commit is contained in:
parent
e7e21c194e
commit
7bf57c60fb
1 changed files with 3 additions and 0 deletions
|
@ -251,6 +251,9 @@ def handle_delete_status(activity):
|
||||||
def handle_favorite(activity):
|
def handle_favorite(activity):
|
||||||
''' approval of your good good post '''
|
''' approval of your good good post '''
|
||||||
fav = activitypub.Like(**activity)
|
fav = activitypub.Like(**activity)
|
||||||
|
# we dont know this status, we don't care about this status
|
||||||
|
if not models.Status.objects.filter(remote_id=fav.object).exists():
|
||||||
|
return
|
||||||
|
|
||||||
fav = fav.to_model(models.Favorite)
|
fav = fav.to_model(models.Favorite)
|
||||||
if fav.user.local:
|
if fav.user.local:
|
||||||
|
|
Loading…
Reference in a new issue