Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Log version validation errors with ID from record #889

Merged

Conversation

owenr
Copy link
Contributor

@owenr owenr commented Nov 17, 2016

I came across a case where the logging of errors in PaperTrail is causing an exception (and hiding the underlying issue). I have a convoluted example in the usual bug report format and a fix attached. No tests provided since I am unsure how to reproduce this without doing something complex or unusual.

@batter
Copy link
Collaborator

batter commented Nov 17, 2016

I ran your bug report and got this error:

/Users/batkins/.rvm/gems/ruby-2.3.1@paper_trail/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `initialize': SQLite3::SQLException: table versions has no column named transaction_id: CREATE  INDEX "index_versions_on_transaction_id" ON "versions" ("transaction_id") (ActiveRecord::StatementInvalid)

After commenting out the offending line, I re-ran it, and got the error you're reporting. Good catch here and the fix looks like it's spot on. Thanks for the PR!

@batter batter merged commit c51aee5 into paper-trail-gem:master Nov 17, 2016
@jaredbeck
Copy link
Member

Thanks Owen. This one's probably my fault from #719

@owenr owenr deleted the record_trail_log_version_errors_bug branch November 21, 2016 03:32
batter added a commit that referenced this pull request Nov 26, 2016
batter added a commit that referenced this pull request Nov 26, 2016
batter added a commit that referenced this pull request Nov 29, 2016
BUGFIX: Log version validation errors with ID from record
batter added a commit that referenced this pull request Nov 29, 2016
aried3r pushed a commit to aried3r/paper_trail that referenced this pull request Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants