mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Better handling of missing subs.
This commit is contained in:
parent
cab602e3f1
commit
2aaf6d8b25
1 changed files with 2 additions and 1 deletions
|
@ -1431,6 +1431,7 @@ class UserSubscriptionFolders(models.Model):
|
|||
self.save()
|
||||
|
||||
if not multiples_found and deleted and commit_delete:
|
||||
user_sub = None
|
||||
try:
|
||||
user_sub = UserSubscription.objects.get(user=self.user, feed=feed_id)
|
||||
except (Feed.DoesNotExist, UserSubscription.DoesNotExist):
|
||||
|
@ -1439,7 +1440,7 @@ class UserSubscriptionFolders(models.Model):
|
|||
try:
|
||||
user_sub = UserSubscription.objects.get(user=self.user,
|
||||
feed=duplicate_feed[0].feed)
|
||||
except Feed.DoesNotExist:
|
||||
except (Feed.DoesNotExist, UserSubscription.DoesNotExist):
|
||||
return
|
||||
if user_sub:
|
||||
user_sub.delete()
|
||||
|
|
Loading…
Add table
Reference in a new issue