Skip to content

Commit

Permalink
Fix add check for no end_date
Browse files Browse the repository at this point in the history
  • Loading branch information
pxwxnvermx committed Nov 27, 2024
1 parent e171f22 commit fe18fc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commcare_connect/opportunity/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def clean(self):
"optional_deliver_units",
error=f"{deliver_unit_obj.name} cannot be marked both Required and Optional",
)
if cleaned_data["end_date"] < now().date():
if cleaned_data["end_date"] and cleaned_data["end_date"] < now().date():
self.add_error("end_date", "Please provide a valid end date.")
return cleaned_data

Expand Down

0 comments on commit fe18fc6

Please sign in to comment.