diff --git a/wagtail/users/forms.py b/wagtail/users/forms.py index e2a8851419..ed5063b863 100644 --- a/wagtail/users/forms.py +++ b/wagtail/users/forms.py @@ -1,3 +1,4 @@ +import warnings from itertools import groupby from operator import itemgetter @@ -436,7 +437,8 @@ class AvatarPreferencesForm(forms.ModelForm): try: self._original_avatar.storage.delete(self._original_avatar.name) except IOError: - pass # failure to delete the old avatar shouldn't prevent us from continuing + # failure to delete the old avatar shouldn't prevent us from continuing + warnings.warn("Failed to delete old avatar file: %s" % self._original_avatar.name) super().save(commit=commit) class Meta: