diff --git a/media/forms.py b/media/forms.py index 2fb16e6..cebda4a 100644 --- a/media/forms.py +++ b/media/forms.py @@ -34,13 +34,13 @@ class MediaAdminForm(ModelForm): # Fill the data # TODO implement authors, side_identifier - if data['title']: + if 'title' in data: self.cleaned_data['title'] = data['title'] - if data['subtitle']: + if 'subtitle' in data: self.cleaned_data['subtitle'] = data['subtitle'] - if data['url']: + if 'url' in data: self.cleaned_data['external_url'] = data['url'] - if data['number_of_pages']: + if 'number_of_pages' in data: self.cleaned_data['number_of_pages'] = \ data['number_of_pages']