mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Deleted users show up with [deleted].
This commit is contained in:
parent
27774cb330
commit
13bcc16416
1 changed files with 5 additions and 2 deletions
|
@ -163,7 +163,10 @@ class MSocialProfile(mongo.Document):
|
|||
|
||||
@property
|
||||
def user(self):
|
||||
return User.objects.get(pk=self.user_id)
|
||||
try:
|
||||
return User.objects.get(pk=self.user_id)
|
||||
except User.DoesNotExist:
|
||||
return None
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.subscription_count:
|
||||
|
@ -360,7 +363,7 @@ class MSocialProfile(mongo.Document):
|
|||
params = {
|
||||
'id': 'social:%s' % self.user_id,
|
||||
'user_id': self.user_id,
|
||||
'username': self.user.username,
|
||||
'username': self.user.username if self.user else "[deleted]",
|
||||
'photo_url': self.email_photo_url,
|
||||
'large_photo_url': self.large_photo_url,
|
||||
'location': self.location,
|
||||
|
|
Loading…
Add table
Reference in a new issue