From 468974f92f302102d05df9721e4645683710f6be Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sat, 9 Feb 2008 01:54:57 +0100 Subject: [PATCH] * Fix error in import.py that caused everybody to be an admin. --- import.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/import.py b/import.py index 1e77c90..26d0af1 100644 --- a/import.py +++ b/import.py @@ -31,6 +31,11 @@ for row in c.fetchall(): except User.DoesNotExist: u = User(username=username) + if row[1]: + su = 1 + else: + su = 0 + c.execute("SELECT dyn_prop.name, dyn_prop_value.value" " FROM dyn_prop_value, dyn_prop WHERE" " dyn_prop_value.dynamicPropertyObjectId=%s AND" @@ -40,10 +45,6 @@ for row in c.fetchall(): for row in c.fetchall(): props[row[0]] = row[1] - if row[1]: - su = 1 - else: - su = 0 u.is_superuser = su u.is_staff = su names = props.get('Naam','').split(' ', 1) -- 2.30.2