forked from mirrors/bookwyrm
Catch error trying to get status id in delete
This commit is contained in:
parent
648e7a7581
commit
c0bc4f3903
1 changed files with 6 additions and 1 deletions
|
@ -238,7 +238,12 @@ def handle_create(activity):
|
||||||
@app.task
|
@app.task
|
||||||
def handle_delete_status(activity):
|
def handle_delete_status(activity):
|
||||||
''' remove a status '''
|
''' remove a status '''
|
||||||
|
try:
|
||||||
status_id = activity['object']['id']
|
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:
|
try:
|
||||||
status = models.Status.objects.select_subclasses().get(
|
status = models.Status.objects.select_subclasses().get(
|
||||||
remote_id=status_id
|
remote_id=status_id
|
||||||
|
|
Loading…
Reference in a new issue