Forgot to modify 'delete_after_watched' to 'automatically_delete_watched' in index views, which was causing a backend error when editing a subscription.

This commit is contained in:
Tiberiu Chibici 2019-08-19 16:40:40 +03:00
parent 2ae41efb9e
commit 71e389c14a

View File

@ -283,7 +283,7 @@ class CreateSubscriptionForm(forms.ModelForm):
'auto_download', 'auto_download',
'download_limit', 'download_limit',
'download_order', 'download_order',
'delete_after_watched' 'automatically_delete_watched'
) )
def clean_playlist_url(self): def clean_playlist_url(self):
@ -349,7 +349,7 @@ class UpdateSubscriptionForm(forms.ModelForm):
'auto_download', 'auto_download',
'download_limit', 'download_limit',
'download_order', 'download_order',
'delete_after_watched' 'automatically_delete_watched'
) )
@ -403,7 +403,7 @@ class ImportSubscriptionsForm(forms.Form):
auto_download = forms.ChoiceField(choices=TRUE_FALSE_CHOICES, required=False) auto_download = forms.ChoiceField(choices=TRUE_FALSE_CHOICES, required=False)
download_limit = forms.IntegerField(required=False) download_limit = forms.IntegerField(required=False)
download_order = forms.ChoiceField(choices=VIDEO_ORDER_CHOICES_WITH_EMPTY, required=False) download_order = forms.ChoiceField(choices=VIDEO_ORDER_CHOICES_WITH_EMPTY, required=False)
delete_after_watched = forms.ChoiceField(choices=TRUE_FALSE_CHOICES, required=False) automatically_delete_watched = forms.ChoiceField(choices=TRUE_FALSE_CHOICES, required=False)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
@ -418,7 +418,7 @@ class ImportSubscriptionsForm(forms.Form):
'auto_download', 'auto_download',
'download_limit', 'download_limit',
'download_order', 'download_order',
'delete_after_watched' 'automatically_delete_watched'
) )
def __clean_empty_none(self, name: str): def __clean_empty_none(self, name: str):
@ -438,8 +438,8 @@ class ImportSubscriptionsForm(forms.Form):
def clean_auto_download(self): def clean_auto_download(self):
return self.__clean_boolean('auto_download') return self.__clean_boolean('auto_download')
def clean_delete_after_watched(self): def clean_automatically_delete_watched(self):
return self.__clean_boolean('delete_after_watched') return self.__clean_boolean('automatically_delete_watched')
def clean_download_order(self): def clean_download_order(self):
return self.__clean_empty_none('download_order') return self.__clean_empty_none('download_order')