feat: Use new shortcuts when creating ANs
This commit is contained in:
parent
66a0b42718
commit
2015f8b332
@ -205,16 +205,9 @@ def add_adoption_notice(request):
|
|||||||
|
|
||||||
# Set correct status
|
# Set correct status
|
||||||
if request.user.trust_level >= User.TRUST_LEVEL[User.COORDINATOR]:
|
if request.user.trust_level >= User.TRUST_LEVEL[User.COORDINATOR]:
|
||||||
major_status = AdoptionNoticeStatus.ACTIVE
|
instance.set_active()
|
||||||
minor_status = AdoptionNoticeStatus.MINOR_STATUS_CHOICES[AdoptionNoticeStatus.ACTIVE]["searching"]
|
|
||||||
else:
|
else:
|
||||||
major_status = AdoptionNoticeStatus.AWAITING_ACTION
|
instance.set_to_review()
|
||||||
minor_status = AdoptionNoticeStatus.MINOR_STATUS_CHOICES[AdoptionNoticeStatus.AWAITING_ACTION][
|
|
||||||
"waiting_for_review"]
|
|
||||||
status = AdoptionNoticeStatus.objects.create(major_status=major_status,
|
|
||||||
minor_status=minor_status,
|
|
||||||
adoption_notice=instance)
|
|
||||||
status.save()
|
|
||||||
|
|
||||||
# Get the species and number of animals from the form
|
# Get the species and number of animals from the form
|
||||||
species = form.cleaned_data["species"]
|
species = form.cleaned_data["species"]
|
||||||
|
Loading…
Reference in New Issue
Block a user