Update tests for new datetime handling

This commit is contained in:
Christopher C. Wells 2022-08-14 12:24:27 -07:00 committed by Christopher C. Wells
parent 353533a6ef
commit c1e9f28215
1 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import datetime
from typing import Any, Dict, Optional from typing import Any, Dict, Optional
from django.forms import Widget, RadioSelect, DateTimeInput as DateTimeInputBase from django.forms import Widget, RadioSelect, DateTimeInput as DateTimeInputBase
@ -110,4 +111,6 @@ class DateTimeInput(DateTimeInputBase):
input_type = "datetime-local" input_type = "datetime-local"
def format_value(self, value): def format_value(self, value):
return value.isoformat() if isinstance(value, datetime.datetime):
value = value.isoformat()
return value