Minor python cleanup

This commit is contained in:
2021-01-28 18:38:55 +00:00
parent cc233e0223
commit 6a4620a2e5
6 changed files with 78 additions and 68 deletions

View File

@@ -202,7 +202,8 @@ class EventChecklistForm(forms.ModelForm):
}
# Two possible formats
def parsedatetime(self, date_string):
@staticmethod
def parsedatetime(date_string):
try:
return timezone.make_aware(datetime.strptime(date_string, '%Y-%m-%dT%H:%M:%S'))
except ValueError: