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

Method clean_uploaded_file

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

Source from the content-addressed store, hash-verified

53 return instance
54
55 def clean_uploaded_file(self):
56 uploaded_file = self.cleaned_data.get('uploaded_file')
57 if uploaded_file:
58 if not uploaded_file.name.endswith('.m3u'):
59 raise forms.ValidationError("The uploaded file must be an M3U file.")
60 return uploaded_file
61
62 def clean(self):
63 cleaned_data = super().clean()

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected