diff --git a/events/models/profiles.py b/events/models/profiles.py index 7127dfb..bb5aee5 100644 --- a/events/models/profiles.py +++ b/events/models/profiles.py @@ -46,7 +46,7 @@ class UserProfile(models.Model): return "Unknown Profile" def avatar_url(self): - if self.avatar is None or self.avatar == '': + if self.avatar is None or self.avatar.name is None: return settings.STATIC_URL + 'img/avatar_placeholder.png' elif self.avatar.name.startswith('http'): return self.avatar.name