MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / clean

Method clean

apps/m3u/forms.py:62–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 return uploaded_file
61
62 def clean(self):
63 cleaned_data = super().clean()
64 url = cleaned_data.get('server_url')
65 file = cleaned_data.get('uploaded_file')
66 # Ensure either `server_url` or `uploaded_file` is provided
67 if not url and not file:
68 raise forms.ValidationError("Either an M3U URL or a file upload is required.")
69 return cleaned_data
70
71
72class M3UFilterForm(forms.ModelForm):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected