Do not override the source on a Wish if a work is already on the wishlist
parent
d3bd2453ef
commit
dab3ecfc31
|
@ -594,7 +594,6 @@ class Wishlist(models.Model):
|
||||||
def add_work(self, work, source):
|
def add_work(self, work, source):
|
||||||
try:
|
try:
|
||||||
w = Wishes.objects.get(wishlist=self,work=work)
|
w = Wishes.objects.get(wishlist=self,work=work)
|
||||||
w.source=source
|
|
||||||
except:
|
except:
|
||||||
Wishes.objects.create(source=source,wishlist=self,work=work)
|
Wishes.objects.create(source=source,wishlist=self,work=work)
|
||||||
work.update_num_wishes()
|
work.update_num_wishes()
|
||||||
|
|
Loading…
Reference in New Issue