Comment 1 for bug 1288919

Revision history for this message
kaputtnik (franku) wrote :

I could confirm this and, maybe, piovide a patch. I think its because of a missing path to the standard avatar of old registrations.

I created two users in my loacla copy of widelands website. Then i dumped the contents of "wlprofile" like this:

./manage.py dumpdata wlprofile.profile > ~/wlprofile.json

Then i edit this file and removed the standard path to "wlprofile/anonymous.png" from one user.

After starting the server the behavior is like on widelands.org: No Avatar for the modified user, if i try to change the avatar an error is thrown. Thats because django? tries to delete an folder. The error occurs in "wlprofile/fields.py". Because no standard path to the file is set, there is no file to delete.

The correction i have made was to comment two rows of code. I tested this:

user with no avatar-path: Create an avatar and deleted it again -> all fine, after that the anonymous-avatar is used
user with avatar-path: try to clear the anonymous-avatar -> nothing happend; add a new avatar and delete it -> the anonymous avatar is used.

So i think its all good. But because i am not familiar with the code, someone else may find a better solution :-)