New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Teams model #552
Add Teams model #552
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it looks good but some changes are needed. Please also check and modify the style in the tests and with the docstrings.
Additionally, you don't need that merge commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In overall it looks ok but I don't like much the way you're solving the integrity problem with the same name team without organization.
You also need to remove that merge commit that is there.
Yes, I have a call with Venu today to fix that. I thought its better to let him show me how to fix that the first time! |
@sduenas I have fixed the commits (thanks to @vchrombie!). We were wondering about the changelog entry. Should that be added as part of this PR? |
Maybe we can skip that part until the implementation with graphql + ui is done. |
@Rashmi-K-A would you mind to change the style of the commits again? The body of the message should be limited to 70 characters or so. Now they are very long and only good for large screens. |
@Rashmi-K-A |
Jinx! 😄 🥂 |
@Rashmi-K-A let me know if you need help with anything. |
Adds a model called `Team` that can be used to represent organizational units. The Team model stores the `name` of the team and links to the Organization object it belongs to. Signed-off-by: Rashmi-K-A <k.a.rashmi04@gmail.com>
Adds three functions to handle Team objects: `add_team`, `find_team`, `delete_team`. The function add_team() adds a new Team object to the registry. The Team can optionally belong to an Organization. It can also optionally be created under an existing Team object as a subteam to represent an organizational hierarchy. The function find_team() finds a Team by its name in the registry. The function delete_team() deletes a Team object and all related objects (i.e all subteams) from the database. Signed-off-by: Rashmi-K-A <k.a.rashmi04@gmail.com>
The function add_team() allows users to create a new Team object. The function delete_team() allows users to delete existing Team objects and all of their subteams. Signed-off-by: Rashmi-K-A <k.a.rashmi04@gmail.com>
Thanks @vchrombie @sduenas !! I have fixed it now 💯 Let me know if I need to change anything else! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged. Thanks for your contribution! |
This PR is in reference to issue #548 for creating a
GroupsTeams model to handle organizational hierarchies. This PR includes changes to the following files:add_team
,find_team
anddelete_team
add_team
,delete_team
#541 has more information on the discussion around how to handle organizational hierarchies.