Fixed leading whitespace in API

This commit is contained in:
Martin Mahner 2018-03-12 13:46:55 +01:00
parent 7efff4fa19
commit 5278866610

View file

@ -81,6 +81,7 @@ class SnippetForm(forms.ModelForm):
self.fields['lexer'].initial = request.GET['l']
def clean_content(self):
import ipdb, os; os.system("stty sane"); ipdb.set_trace()
content = self.cleaned_data.get('content', '')
if content.strip() == '':
raise forms.ValidationError(_('This field is required.'))