From a99a21cce23460aae3a63a7bb5bfebe188f6df1f Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Fri, 2 Mar 2018 21:04:32 +0100 Subject: Keep note commit around if commit_id is present Closes gitaly#1054 --- app/models/note.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/note.rb b/app/models/note.rb index d7a67ec277c..a3e40fce0fe 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -424,7 +424,7 @@ class Note < ActiveRecord::Base private def keep_around_commit - project.repository.keep_around(self.commit_id) + project.repository.keep_around(self.commit_id) if self.commit_id.present? end def nullify_blank_type -- cgit v1.2.1