mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-20 14:21:00 +00:00
Fixed #365: Actually clear profile images on check
This commit is contained in:
parent
fa003e2be6
commit
0cfd0813f2
1 changed files with 8 additions and 0 deletions
|
@ -94,6 +94,14 @@ class ProfilePage(FormView):
|
|||
resize_image(image, size=(1500, 500)),
|
||||
)
|
||||
identity.metadata = form.cleaned_data.get("metadata")
|
||||
|
||||
# Clear images if specified
|
||||
if "icon__clear" in self.request.POST:
|
||||
identity.icon = None
|
||||
if "image__clear" in self.request.POST:
|
||||
identity.image = None
|
||||
|
||||
# Save and propagate
|
||||
identity.save()
|
||||
identity.transition_perform(IdentityStates.edited)
|
||||
|
||||
|
|
Loading…
Reference in a new issue