Only sending mails for accepted offers
This commit is contained in:
parent
75f7afd151
commit
bcab2f9371
|
@ -115,6 +115,7 @@ def updateOfferAccepted(request, id, email, user_type):
|
||||||
opening.offer_accepted = offer_accepted == "true"
|
opening.offer_accepted = offer_accepted == "true"
|
||||||
opening.changed_by = get_object_or_404(User, id=id)
|
opening.changed_by = get_object_or_404(User, id=id)
|
||||||
opening.save()
|
opening.save()
|
||||||
|
if opening.offer_accepted:
|
||||||
send_opening_notifications(opening.id)
|
send_opening_notifications(opening.id)
|
||||||
else:
|
else:
|
||||||
raise ValueError("Offer Status already updated")
|
raise ValueError("Offer Status already updated")
|
||||||
|
|
Loading…
Reference in New Issue