diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-11-13 21:38:15 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-11-13 21:40:54 +0300 |
commit | aefefbf11701042ae59a60818e3f957b30831dfd (patch) | |
tree | 8d8bd3d7a63ba2767b3e37dcb9bc00af80552d92 /app/models/diff_note.rb | |
parent | 9200b500125d15a56d10e66c9bcd78943e4386b1 (diff) |
Prevents position update for image diff notes
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r-- | app/models/diff_note.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index d88a92dc027..ae5f138a920 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -18,7 +18,8 @@ class DiffNote < Note validate :positions_complete validate :verify_supported - before_validation :set_original_position, :update_position, on: :create + before_validation :set_original_position, on: :create + before_validation :update_position, on: :create, if: :on_text? before_validation :set_line_code after_save :keep_around_commits |