mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-20 15:02:31 +00:00
Minor python cleanup
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user