From: Jan Szejko Date: Thu, 26 Jan 2017 15:52:04 +0000 (+0100) Subject: strip commas in project descriptions X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/932c822c457572e708d9aeca6b71e7d3b726f18c?hp=e515627122bf9dc3f21c428f4e48eea835dadf8e strip commas in project descriptions --- diff --git a/apps/organizations/forms.py b/apps/organizations/forms.py index e7e3250d..98efeab0 100644 --- a/apps/organizations/forms.py +++ b/apps/organizations/forms.py @@ -17,7 +17,7 @@ def clean_projects(projects): line = line.strip() if line: try: - url, lang, desc = line.split(None, 2) + url, lang, desc = [part.strip(',') for part in line.split(None, 2)] except ValueError: raise forms.ValidationError( _('Each line has to consist of an Internet address, language and description, '