tighten exception handling

got a bunch of integrity errors failure; probably some other exception being throughn here.
pull/94/head
eric 2019-06-06 17:23:45 -04:00
parent b991f723f2
commit e42d77589b
1 changed files with 1 additions and 1 deletions

View File

@ -1093,7 +1093,7 @@ class Wishlist(models.Model):
def add_work(self, work, source, notify=False):
try:
w = Wishes.objects.get(wishlist=self, work=work)
except:
except Wishes.DoesNotExist:
Wishes.objects.create(source=source, wishlist=self, work=work)
work.update_num_wishes()
# only send notification in case of new wishes