Catch error trying to get status id in delete

This commit is contained in:
Mouse Reeve 2020-11-12 12:02:43 -08:00
parent 648e7a7581
commit c0bc4f3903

View file

@ -238,7 +238,12 @@ def handle_create(activity):
@app.task
def handle_delete_status(activity):
''' remove a status '''
status_id = activity['object']['id']
try:
status_id = activity['object']['id']
except TypeError:
# this isn't a great fix, because you hit this when mastadon
# is trying to delete a user.
return
try:
status = models.Status.objects.select_subclasses().get(
remote_id=status_id