From 11da6ea358e7b059888fd4d8a1af2edb739d1762 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 14 Aug 2012 14:20:32 +0200 Subject: [PATCH] support for spaces in fixed wluri-s --- apps/catalogue/management/commands/fixdc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.20.1