aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-08-02 06:49:16 +0300
committerFrederick Muriuki Muriithi2023-08-02 06:49:16 +0300
commitcc5766fe166cb4bf0dbcd18e3b79a39edd3e7c3a (patch)
treeb7ef765d31dfe2807c50c5f68fba39d5803b350e /scripts
parent5b7e512c39f36420fa6440a402ed7d67cad33468 (diff)
downloadgenenetwork3-cc5766fe166cb4bf0dbcd18e3b79a39edd3e7c3a.tar.gz
Use correct variable
After copying the calls to assign appropriate roles to the admin in the script, I forgot to update the variable name. This commit fixes that.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/migrate_existing_data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/migrate_existing_data.py b/scripts/migrate_existing_data.py
index 3e0a250..186f7f8 100644
--- a/scripts/migrate_existing_data.py
+++ b/scripts/migrate_existing_data.py
@@ -88,8 +88,8 @@ def admin_group(conn: authdb.DbConnection, admin: User) -> Group:
})
cursor.execute("INSERT INTO group_users VALUES (?, ?)",
(str(new_group.group_id), str(admin.user_id)))
- revoke_user_role_by_name(cursor, group_leader, "group-creator")
- assign_user_role_by_name(cursor, group_leader, "group-leader")
+ revoke_user_role_by_name(cursor, admin, "group-creator")
+ assign_user_role_by_name(cursor, admin, "group-leader")
return new_group
def __resource_category_by_key__(