Skip to content
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

Agree behaviour for add_team and add_fixture methods on Competition #25

Open
SebDuff opened this issue Oct 5, 2020 · 0 comments
Open
Assignees

Comments

@SebDuff
Copy link
Collaborator

SebDuff commented Oct 5, 2020

We need to agree how we want the add_team(Team) and add_fixture(Fixture) (not yet created) methods to behave.

For add_team(Team), I was thinking we should check if there is already a team with that name. If one is already in the list, throw an exception, else add. This will prevent duplicate teams being added and force us to retrieve the team and update it directly. Alternatively, we could have an optional override parameter which forces it to replace the team with the same name (if it exists).

For add_fixture(Fixture), it's a practical case that the same two teams will play each other in the same competition, so I think we should just add the fixture if the same Fixture object doesn't already exist in the list (as per current functionality of add_team(Team))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants