FAI-CIVL / FAI-Airscore

AirScore - online paragliding / hanggliding GAP-based scoring software.
https://airscore.cc/
GNU General Public License v3.0
13 stars 17 forks source link

How to delete an imported competition? #211

Open philderbeast opened 3 years ago

philderbeast commented 3 years ago

After trying to import a comp three times, each time failing with the long pilot name #208, I see there are three comps that as admin I cannot see how to delete. Here are screenshots of the Public Website and Administration competition tables.

Screen Shot 2020-12-19 at 10 23 53 AM

Screen Shot 2020-12-19 at 10 29 39 AM

Screen Shot 2020-12-19 at 10 24 04 AM

kuaka commented 3 years ago

@philderbeast in this case I suggest you delete from the database tblCompetition table. (or ignore) The comps on the admin page are queried from the DB joining the tblCompetition and the tblCompAuth table where the ownership of the comp lies.

@biuti My guess is that this ownership record is created at the end of the import process (that in this case never competes). A quick fix might be to write to this table as soon as the comp has successfully been created in tblCompetition so that it will be present on the admin page. A better fix would be as well as the above to try/except import the comp and if not successful to do a cleanup and also notify the user of the error.