From ff501a330490da5794405568a1c9cbbc9aff24cb Mon Sep 17 00:00:00 2001 From: Allen Short Date: Mon, 10 Jun 2013 16:42:40 -0700 Subject: [PATCH] clear cached cleaned strings when fixing description --- apps/addons/management/commands/personas_fix_mojibake.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/addons/management/commands/personas_fix_mojibake.py b/apps/addons/management/commands/personas_fix_mojibake.py index 8eb9c9a6ca..5361ba682e 100644 --- a/apps/addons/management/commands/personas_fix_mojibake.py +++ b/apps/addons/management/commands/personas_fix_mojibake.py @@ -98,8 +98,9 @@ class Command(BaseCommand): except UnicodeDecodeError: print "SKIPPED", id self.cursor_z.execute( - 'UPDATE translations as t, personas as p set t.localized_string = %s ' - 'where t.id = p.description and p.persona_id = %s', [desc, id]) + 'UPDATE translations AS t, personas AS p SET t.localized_string = %s, ' + 't.localized_string_clean = NULL ' + 'WHERE t.id = p.description AND p.persona_id = %s', [desc, id]) def count_themes(self): self.cursor_z.execute('SELECT count(persona_id) from personas')