From 256f13f675c60547b10a06736f0a7cb3faf752d5 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 25 May 2023 19:11:49 +0300 Subject: Script to assign existing data to publicly-visible resources A script to assign existing data not assigned to any group to publicly-visible resources. --- gn3/auth/authorisation/groups/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn3/auth/authorisation/groups') diff --git a/gn3/auth/authorisation/groups/models.py b/gn3/auth/authorisation/groups/models.py index ea629e0..5a3ae50 100644 --- a/gn3/auth/authorisation/groups/models.py +++ b/gn3/auth/authorisation/groups/models.py @@ -94,7 +94,7 @@ def create_group( raise MembershipError(group_leader, user_groups) with db.cursor(conn) as cursor: - new_group = __save_group__( + new_group = save_group( cursor, group_name,( {"group_description": group_description} if group_description else {})) @@ -198,7 +198,7 @@ def all_groups(conn: db.DbConnection) -> Maybe[Sequence[Group]]: return Nothing -def __save_group__( +def save_group( cursor: db.DbCursor, group_name: str, group_metadata: dict[str, Any]) -> Group: """Save a group to db""" -- cgit v1.2.3