zalsaeed / cgav

Certificate Generation and Verification
GNU General Public License v3.0
3 stars 1 forks source link

Error Handling: Event Deletion #40

Closed SalmanSaleh1 closed 4 months ago

SalmanSaleh1 commented 4 months ago

image

Error! (pymysql.err.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (cgav.Certificate_table, CONSTRAINT Certificate_table_ibfk_2 FOREIGN KEY (certificate_event_id) REFERENCES addCertificate (certificate_event_id))') [SQL: DELETE FROM addCertificate WHERE addCertificate.certificate_event_id = %(certificate_event_id)s] [parameters: {'certificate_event_id': 1}] (Background on this error at: https://sqlalche.me/e/14/gkpj)

SalmanSaleh1 commented 4 months ago

An error prevents the deletion of an event named "دورة", while events named "1" and "course" can be deleted without issues.

SalmanSaleh1 commented 4 months ago

I've added a new event called "سلمان" which can be deleted without any issues.

SalmanSaleh1 commented 4 months ago

After deleting the project files and rebuilding the Docker Compose, the bug disappeared, indicating that it was caused by files on my computer.