diff options
author | Andrew Godwin | 2022-11-20 12:51:15 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-20 12:51:15 -0700 |
commit | 94d92fdf8a62c3cdc277d82c15a450f62ab7ee3b (patch) | |
tree | 9961738163c39d87ca420521e2ca3972b36b9ef7 | |
parent | 2d7f33879f9319cd47aae0d6fe8486a7c6d0c95b (diff) | |
download | takahe-94d92fdf8a62c3cdc277d82c15a450f62ab7ee3b.tar.gz takahe-94d92fdf8a62c3cdc277d82c15a450f62ab7ee3b.tar.bz2 takahe-94d92fdf8a62c3cdc277d82c15a450f62ab7ee3b.zip |
Handle remote user deletions
-rw-r--r-- | users/models/identity.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/users/models/identity.py b/users/models/identity.py index c26762d..510b947 100644 --- a/users/models/identity.py +++ b/users/models/identity.py @@ -327,6 +327,10 @@ class Identity(StatorModel): ) except httpx.RequestError: return False + if response.status_code == 410: + # Their account got deleted, so let's do the same. + await Identity.objects.filter(pk=self.pk).adelete() + return False if response.status_code >= 400: return False document = canonicalise(response.json(), include_security=True) |