Fixed #365: Actually clear profile images on check
This commit is contained in:
parent
fa003e2be6
commit
0cfd0813f2
|
@ -94,6 +94,14 @@ class ProfilePage(FormView):
|
||||||
resize_image(image, size=(1500, 500)),
|
resize_image(image, size=(1500, 500)),
|
||||||
)
|
)
|
||||||
identity.metadata = form.cleaned_data.get("metadata")
|
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.save()
|
||||||
identity.transition_perform(IdentityStates.edited)
|
identity.transition_perform(IdentityStates.edited)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue