codeforcroatia / imamopravoznati

Provide a Freedom of Information request system for your jurisdiction
http://alaveteli.org
Other
3 stars 1 forks source link

Delete request will not delete annotations #20

Closed schlos closed 9 years ago

schlos commented 9 years ago

When deleteing request it will not delete annotations, so request liked data will stay linked to original request although request is gone

schlos commented 9 years ago

Temporary solution is to delete the comment from the console:

"bundle exec rails console"

Then execute:

comment = Comment.find(:first, :conditions => ['info_request_id = 3']) comment.destroy

crowbot made a pull request to make sure comments (and censor rules) are deleted when their associated info requests are destroyed [1]

[1] https://github.com/mysociety/alaveteli/pull/2319