iucogs / pubs

Publication management system
http://pubs.cogs.indiana.edu
4 stars 0 forks source link

Odd behavior when deleting citations in pubs #1

Closed pjcraig closed 12 years ago

pjcraig commented 12 years ago

Deleting a citation returns this SQL error.

Cannot delete or update a parent row: a foreign key constraint fails 
(`pubscopy`.`author_of`, CONSTRAINT `fk_author_of_citations1` FOREIGN KEY (`citation_id`) REFERENCES `citations` (`citation_id`) ON DELETE NO ACTION ON     UPDATE NO ACTION)<br />

DELETE FROM citations WHERE citation_id=34234 <br /><br />

If you click on the second page (another issue- there should only be one page if there's fewer than 100 citations) it magically seems to go away. Might be a problem with the way we're deleting citations.

Abhinav, you were working on the delete function at one point- maybe you could take a look at it?

pjcraig commented 12 years ago

Fixed by Abhinav per his first commit on Aug 23 2012.