get5-web icon indicating copy to clipboard operation
get5-web copied to clipboard

Error when deleting teams after a match

Open InfAmoUsaeble opened this issue 7 years ago • 4 comments

Hello

I can't seem to get a team deleted from the web module, if a match has been set up and cancelled afterwards. Not sure if this also happens after a completed match.

Sorry, unexpected error: (_mysql_exceptions.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (get5.match, CONSTRAINT match_ibfk_3 FOREIGN KEY (team2_id) REFERENCES team (id))') [SQL: u'DELETE FROM team WHERE team.id = %s'] [parameters: (2,)]

I've tried dropping the database and removing the db user alltogether. Same problem :(

Thanks btw for your time, already using some of the other plugins to full satisfaction :)

/aeble

InfAmoUsaeble avatar Apr 30 '18 16:04 InfAmoUsaeble

Once a match has been created, you won’t be able to delete teams, this is so that there will always be data available, if you search this git, you will find the issue multiple times.

Technoblazed avatar Apr 30 '18 16:04 Technoblazed

Sorry, thought my google skills were in order.. :( Thank you for your reply

Why is the message from MySQL, and not something which doesn't make lesser aware people like me worry? :)

InfAmoUsaeble avatar Apr 30 '18 18:04 InfAmoUsaeble

As per https://github.com/splewis/get5-web/issues/30

It's mostly intended that you can't delete teams once they've been used in a match, but it's supposed to not show the button and not display stack traces.

I assume this is actually a bug and it shouldn't show that :D

Technoblazed avatar Apr 30 '18 18:04 Technoblazed

Ah, hehe :p Let's see .. I'll delete them manually for now :)

Thanks for your time!

InfAmoUsaeble avatar Apr 30 '18 18:04 InfAmoUsaeble