mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Add a clarifying comment
This commit is contained in:
parent
5469668e22
commit
1fb5b47ca0
1 changed files with 1 additions and 0 deletions
|
|
@ -140,6 +140,7 @@ def delete(request, extra_context={}, next_override=None, *args, **kwargs):
|
|||
if delete_avatar_form.is_valid():
|
||||
ids = delete_avatar_form.cleaned_data['choices']
|
||||
if unicode(avatar.id) in ids and avatars.count() > len(ids):
|
||||
# Find the next best avatar, and set it as the new primary
|
||||
for a in avatars:
|
||||
if unicode(a.id) not in ids:
|
||||
a.primary = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue