Skip to content

Commit

Permalink
remove boundary status change validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ashimali committed Nov 25, 2024
1 parent 847664e commit d4f2356
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions application/blueprints/boundary/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from wtforms import RadioField, StringField, TextAreaField
from wtforms.validators import DataRequired, Optional, ValidationError

from application.models import Status
# from application.models import Status


def validate_geometry(form, field):
Expand Down Expand Up @@ -111,14 +111,14 @@ def validate(self, extra_validators=None):
return False

# Validate status if provided
if self.status.data == Status.FOR_PLATFORM.name:
if self.boundary and self.boundary.local_plans[0].status not in [
Status.FOR_PLATFORM,
Status.EXPORTED,
]:
msg = "Can't set status to 'For platform' as the local plan status is '{}'"
msg = msg.format(self.boundary.local_plans[0].status.value)
self.status.errors.append(msg)
return False
# if self.status.data == Status.FOR_PLATFORM.name:
# if self.boundary and self.boundary.local_plans[0].status not in [
# Status.FOR_PLATFORM,
# Status.EXPORTED,
# ]:
# msg = "Can't set status to 'For platform' as the local plan status is '{}'"
# msg = msg.format(self.boundary.local_plans[0].status.value)
# self.status.errors.append(msg)
# return False

return True

0 comments on commit d4f2356

Please sign in to comment.