Get only the ten first characters for the date
This commit is contained in:
parent
8c8692b8d2
commit
9c53d89ad3
|
@ -137,7 +137,7 @@ class MediaAdminForm(ModelForm):
|
|||
if 'publishedDate' in info:
|
||||
if "-" not in info["publishedDate"]:
|
||||
info["publishedDate"] += "-01-01"
|
||||
self.cleaned_data['publish_date'] = info['publishedDate']
|
||||
self.cleaned_data['publish_date'] = info['publishedDate'][:10]
|
||||
|
||||
if 'authors' not in self.cleaned_data \
|
||||
or not self.cleaned_data['authors']:
|
||||
|
|
Loading…
Reference in New Issue