Skip to content

Commit

Permalink
add create_new_site_group
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-labri-tipton committed Oct 12, 2023
1 parent d74a677 commit 06053c0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,18 @@ def create_user(
session.add(user)
site_group.users.append(user)
session.commit()
print(user)

return user


# create a new site group
def create_new_site_group(session: Session, site_group_name: str) -> SiteGroupSQL:
"""Creating a new site group
:param session: database session
:param site_group_name: name of the site group this user will be part of"""

new_site_group = SiteGroupSQL(site_group_name=site_group_name)
session.add(new_site_group)
session.commit()

return new_site_group

0 comments on commit 06053c0

Please sign in to comment.