tighten exception handling
got a bunch of integrity errors failure; probably some other exception being throughn here.pull/94/head
parent
b991f723f2
commit
e42d77589b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue