[entropy.db] fix listConfigProtectEntries SQL query to make it not pull in unused protect metadata

This commit is contained in:
Fabio Erculiani
2009-09-10 17:05:44 +02:00
parent e5416aaa0f
commit e03eb4b181
+2 -3
View File
@@ -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)