splewis / get5-web

An unsupported, proof-of-concept webpanel for servers using the get5 CS:GO server plugin. Please don't use it.
https://get5.splewis.net
GNU General Public License v3.0
103 stars 58 forks source link

Error when deleting teams after a match #98

Open InfAmoUsaeble opened 6 years ago

InfAmoUsaeble commented 6 years ago

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

Technoblazed commented 6 years ago

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.

InfAmoUsaeble commented 6 years ago

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

Technoblazed commented 6 years ago

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

InfAmoUsaeble commented 6 years ago

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

Thanks for your time!