Skip to content

Commit

Permalink
truncate message and title to size of db column
Browse files Browse the repository at this point in the history
  • Loading branch information
eb1909 committed Jul 17, 2018
1 parent cf05dac commit c3cbeab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/proactive_support/mgmt/flags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def set(customer_id, source, identifier, filter, message, options = {})
f.source = source
f.identifier = identifier
f.filter = clean_object filter
f.message = message
f.message = message.to_str[0,255] # truncate to size of db column
f.level = options[:level] || ::ProactiveSupport::INFO
f.debug_params = clean_object options[:debug_params]
f.tags = options[:tags]
Expand Down
2 changes: 1 addition & 1 deletion lib/proactive_support/mgmt/notes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def create(customer_id, user_id, title, options = {})
::ProactiveSupport::Note.new.tap do |n|
n.customer_id = customer_id
n.user_id = user_id
n.title = title
n.title = title.to_str[0,255] # truncate to size of db column
n.content = options[:content]
n.level = options[:level] || ::ProactiveSupport::INFO
n.tags = options[:tags]
Expand Down

0 comments on commit c3cbeab

Please sign in to comment.