forked from mirrors/bookwyrm
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):
|
||||
''' approval of your good good post '''
|
||||
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)
|
||||
if fav.user.local:
|
||||
|
|
Loading…
Reference in a new issue