(self, commit=True)
| 35 | self.fields['enable_vod'].initial = custom_props.get('enable_vod', False) |
| 36 | |
| 37 | def save(self, commit=True): |
| 38 | instance = super().save(commit=False) |
| 39 | |
| 40 | # Handle enable_vod field |
| 41 | enable_vod = self.cleaned_data.get('enable_vod', False) |
| 42 | |
| 43 | custom_props = instance.custom_properties or {} |
| 44 | if not isinstance(custom_props, dict): |
| 45 | custom_props = ensure_custom_properties_dict(custom_props) |
| 46 | |
| 47 | # Update VOD preference |
| 48 | custom_props['enable_vod'] = enable_vod |
| 49 | instance.custom_properties = custom_props |
| 50 | |
| 51 | if commit: |
| 52 | instance.save() |
| 53 | return instance |
| 54 | |
| 55 | def clean_uploaded_file(self): |
| 56 | uploaded_file = self.cleaned_data.get('uploaded_file') |
nothing calls this directly
no test coverage detected