mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-12-25 07:02:23 +00:00
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
Block a user