Skip to content

Commit

Permalink
Fixed error with Rails 7.1 when no user model
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 8, 2023
1 parent 7697348 commit 0d3b28c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 3.0.1 (unreleased)

- Fixed error with Rails 7.1 when no user model

## 3.0.0 (2023-09-20)

- Switched from Mapbox.js to Mapbox GL JS v1 for maps (this affects Mapbox billing)
Expand Down
3 changes: 2 additions & 1 deletion lib/blazer/run_statement.rb
Expand Up @@ -13,7 +13,8 @@ def perform(statement, options = {})
audit = Blazer::Audit.new(statement: audit_statement)
audit.query = query
audit.data_source = data_source.id
audit.user = options[:user]
# only set user if present to avoid error with Rails 7.1 when no user model
audit.user = options[:user] unless options[:user].nil?
audit.save!
end

Expand Down

0 comments on commit 0d3b28c

Please sign in to comment.