From ebd51744729cb1b68754f8ba4d7f9adcec28d58d Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Wed, 8 Nov 2017 12:59:48 +0000 Subject: Handle forks in Gitlab::Checks::LfsIntegrity --- lib/gitlab/checks/lfs_integrity.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gitlab/checks/lfs_integrity.rb b/lib/gitlab/checks/lfs_integrity.rb index 27a95764dc1..f7276a380dc 100644 --- a/lib/gitlab/checks/lfs_integrity.rb +++ b/lib/gitlab/checks/lfs_integrity.rb @@ -15,7 +15,10 @@ module Gitlab return false unless new_lfs_pointers.present? - existing_count = @project.lfs_objects.where(oid: new_lfs_pointers.map(&:lfs_oid)).count + existing_count = @project.lfs_storage_project + .lfs_objects + .where(oid: new_lfs_pointers.map(&:lfs_oid)) + .count existing_count != new_lfs_pointers.count end -- cgit v1.2.1