Skip to content

Agree behaviour for add_team and add_fixture methods on Competition #25

Description

@SebDuff

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))

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions