diff --git a/access/models/other.py b/access/models/other.py index b7e4a1c..740ece6 100644 --- a/access/models/other.py +++ b/access/models/other.py @@ -54,8 +54,8 @@ class Account(models.Model): return self.owner.email def get_phone(self): - return '' if self.phone.national_number else \ - (self.phone.national_number if self.phone.country_code is None else str(self.phone)) + return '' if self.phone is None else ('' if self.phone.national_number else \ + (self.phone.national_number if self.phone.country_code is None else str(self.phone))) class Meta: verbose_name = 'Дополнительная информация о пользователе'