You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same behaviour when we "replace" the avatar. Ex : http://static.pybbm.org/media/pybb/avatar/f46e9eb3-39bf-4775-a243-9bcbd383fdfe.png is still there even after I replace demo's avatar with a magic pony image. (ok, this is a tux zombie, it's normal that a zombie remains even after we kill it. Maybe this is not a good exemple :-p)
Cause is : the default profile form does not manage avatar replacement / deletion.
When the widget return "False", it's because we want to delete the image. Form should delete the old image and then replace avatar's value from "False" to "None" (this will avoid an Exception incompatibility with easy_thumbnail : 'bool' object has no attribute '_committed' raised here (with a None value, this code is not executed).
Are you agree with this reasoning or am I misunderstanding something ?
The text was updated successfully, but these errors were encountered:
Hi @DylannCordel!
This behaviour is default for any FileField in django since 1.3 version.
Look at release notes
So I think this should be handled via signals in project, not in app...
I disagree : avatar management is pybb's problem because it is its own field.
I think an "out of the box" app must works without having to add extra code to manage default behaviour. As default behaviour of Pybb is to allow to upload a new file to use it as avatar, default behaviour should also include this avatar deletion when an user wants to delete or update it.
We could add a setting to auto delete or not the avatar if you think this is needed, but I think pybb must manage the avatar deletion.
When a user upload an avatar, then check "delete" to delete it, avatar is only "unlinked" to this profile : not deleted from the server.
Ex : http://static.pybbm.org/media/pybb/avatar/cc46c3ed-41dd-429a-aee2-4c44cb6a5c28.png is still there but has been "deleted" from the demo's avatar.
Same behaviour when we "replace" the avatar. Ex : http://static.pybbm.org/media/pybb/avatar/f46e9eb3-39bf-4775-a243-9bcbd383fdfe.png is still there even after I replace demo's avatar with a magic pony image. (ok, this is a tux zombie, it's normal that a zombie remains even after we kill it. Maybe this is not a good exemple :-p)
Cause is : the default profile form does not manage avatar replacement / deletion.
When the widget return "False", it's because we want to delete the image. Form should delete the old image and then replace avatar's value from "False" to "None" (this will avoid an Exception incompatibility with easy_thumbnail :
'bool' object has no attribute '_committed'
raised here (with a None value, this code is not executed).Are you agree with this reasoning or am I misunderstanding something ?
The text was updated successfully, but these errors were encountered: