diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-26 13:50:48 +0200 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-05-29 15:03:00 -0400 |
commit | 21d0cddd456c03e776a8b30e4695ede94c400792 (patch) | |
tree | d5e72a8cf3be922666bbe0fe82c3aec6a8f50866 /app | |
parent | 0e613db76d8d6e8521a3b4d546f552c8d184ffa1 (diff) | |
download | gitlab-ce-21d0cddd456c03e776a8b30e4695ede94c400792.tar.gz |
Do not override foreign attributes in note factory
Diffstat (limited to 'app')
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index f10446ca45f..e3e522a8d0f 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -34,7 +34,7 @@ class Note < ActiveRecord::Base validates :author, presence: true validate unless: :for_commit? do |note| - unless note.noteable.try(:project) == project + unless note.noteable.try(:project) == note.project errors.add(:invalid_project, 'Note and noteable project mismatch') end end |