You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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))
The text was updated successfully, but these errors were encountered:
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))
The text was updated successfully, but these errors were encountered: