Skip to content

Commit

Permalink
Merge pull request #3675 from hennevogel/bugfix/project_log_rotate_crash
Browse files Browse the repository at this point in the history
[frontend] Fix additional info length
  • Loading branch information
hennevogel committed Aug 25, 2017
2 parents 7144ce5 + e456d2c commit 239fce1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/app/models/project_log_entry.rb
Expand Up @@ -47,8 +47,10 @@ def user
end

# Same mechanism that ApplicationRecord.serialize with extra robustness
# FIXME: We shouldn't slice the input here, this should either fit or never
# reach us through Event...
def additional_info=(obj)
write_attribute(:additional_info, YAML.dump(obj))
write_attribute(:additional_info, YAML.dump(obj)[0..65534])
rescue
write_attribute(:additional_info, nil)
end
Expand Down

0 comments on commit 239fce1

Please sign in to comment.