Is your feature request related to a problem? Please describe.
It will be nice to add checks (e.g. checking if there is a competition on the same date or athlete with the same name, or if a lift already exists in the competition.
Describe the solution you'd like
Before creating a competition, athlete, or lift - check if this already exists.
e.g. for a lift
def create_lift(self, athlete_id, competition_id):
if athlete_id in [lift['athlete'] for athlete in self.lifts(competition_id=competition_id)]:
return {"detail": "Athlete already in competition"}
...
Describe alternatives you've considered
Writing abstracted code using the api components.
Is your feature request related to a problem? Please describe. It will be nice to add checks (e.g. checking if there is a competition on the same date or athlete with the same name, or if a lift already exists in the competition.
Describe the solution you'd like Before creating a competition, athlete, or lift - check if this already exists.
e.g. for a lift
Describe alternatives you've considered Writing abstracted code using the api components.