Commit 9c53d89a authored by ynerant's avatar ynerant

Get only the ten first characters for the date

parent 8c8692b8
Pipeline #4227 passed with stages
in 4 minutes and 59 seconds
......@@ -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']:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment