From 0b8e4f2845d012b5c73e8131361ba3e97170aa99 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 29 Jun 2010 11:02:23 +0100 Subject: [PATCH] Fix filter usage (Fixes theme deletion) --- openlp/plugins/custom/customplugin.py | 2 +- openlp/plugins/songs/songsplugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 7f64aab52..362f8d64c 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -78,7 +78,7 @@ class CustomPlugin(Plugin): return about_text def can_delete_theme(self, theme): - filter_string = u'theme_name=%s' % theme + filter_string = u'theme_name=\'%s\'' % theme if not self.custommanager.get_all_objects_filtered(CustomSlide, filter_string): return True diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index d128bc6a2..c24352a91 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -199,7 +199,7 @@ class SongsPlugin(Plugin): return about_text def can_delete_theme(self, theme): - filter_string = u'theme_name=%s' % theme + filter_string = u'theme_name=\'%s\'' % theme if not self.manager.get_all_objects_filtered(Song, filter_string): return True return False