-
Notifications
You must be signed in to change notification settings - Fork 27
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
[#153876] Fix error when viewing logs for account price groups #2360
[#153876] Fix error when viewing logs for account price groups #2360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only thought to check this because I happened to check the original PR: if you add or remove an account from a price group, it's still appearing as "User added to price group" for the event.
I'm not sure how easy it will be to make this distinction based on subclass. (I'm worried if we did subclasses, then things like the Account subclasses might cause problems here). We could also try something like passing in some interpolation value, "%{object} added to price group".
I'm not sure what the best solution is, but if it's too difficult, maybe we can change it to "Price group member added" or "Member added to price group".
lib/tasks/cleanup.rake
Outdated
namespace :log_events do | ||
desc "update metadata for PriceGroupMembers" | ||
task metadata: :environment do | ||
events = LogEvent.where("loggable_type LIKE ?", "PriceGroupMember").where(metadata: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just loggable_type: "PriceGroupMember"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started out thinking there were loggable types for the subclasses, and forgot to update. Good catch.
Release Notes
I think this has actually been broken since #2302.
Run
rake cleanup:log_events:metadata
after merging