From e03eb4b181fa6d8deec821d862a68bc680e54baf Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 10 Sep 2009 17:05:44 +0200 Subject: [PATCH] [entropy.db] fix listConfigProtectEntries SQL query to make it not pull in unused protect metadata --- libraries/entropy/db.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libraries/entropy/db.py b/libraries/entropy/db.py index 5021eb1c9..9211f9a99 100644 --- a/libraries/entropy/db.py +++ b/libraries/entropy/db.py @@ -6367,9 +6367,8 @@ class EntropyRepository: if mask: mask_t = 'mask' cur = self.cursor.execute(""" - SELECT DISTINCT(protect) FROM configprotectreference - WHERE idprotect >= 1 AND - idprotect <= (SELECT max(idprotect) FROM configprotect%s) + SELECT protect FROM configprotectreference WHERE idprotect IN + (SELECT distinct(idprotect) FROM configprotect%s) ORDER BY protect""" % (mask_t,)) results = self._cur2set(cur)