From: Matthijs Kooijman Date: Sat, 9 Feb 2008 00:54:57 +0000 (+0100) Subject: * Fix error in import.py that caused everybody to be an admin. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=468974f92f302102d05df9721e4645683710f6be;p=matthijs%2Fprojects%2Fxerxes.git * Fix error in import.py that caused everybody to be an admin. --- 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)