diff --git a/app/models/commit.rb b/app/models/commit.rb index f90c42672db8456a6dcdafb791320dbcab1f855f..263e2f74296caf2d27981f885332c3aaf6910315 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -120,10 +120,10 @@ class Commit end def prev_commit - parents.first + parents.try :first end def prev_commit_id - prev_commit.id + prev_commit.try :id end end