From: Radek Czajka Date: Tue, 14 Aug 2012 12:20:32 +0000 (+0200) Subject: support for spaces in fixed wluri-s X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/11da6ea358e7b059888fd4d8a1af2edb739d1762 support for spaces in fixed wluri-s --- diff --git a/apps/catalogue/management/commands/fixdc.py b/apps/catalogue/management/commands/fixdc.py index 80b341c7..a80352d7 100644 --- a/apps/catalogue/management/commands/fixdc.py +++ b/apps/catalogue/management/commands/fixdc.py @@ -18,7 +18,8 @@ class FixDC(XmlUpdater): try: WLURI.strict(elem.text) except ValidationError: - correct_field = unicode(WLURI.from_slug(WLURI(elem.text).slug)) + correct_field = unicode(WLURI.from_slug( + WLURI(elem.text.strip()).slug)) if verbose: print "Changing %s from %s to %s" % ( elem.tag, elem.text, correct_field