diff options
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 76840091112..184fe7868a5 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -117,6 +117,8 @@ module API # rubocop: disable CodeReuse/ActiveRecord def find_project(id) + return unless id + projects = Project.without_deleted if id.is_a?(Integer) || id =~ /^\d+$/ @@ -561,7 +563,7 @@ module API def increment_counter(event_name) feature_name = "usage_data_#{event_name}" - return unless Feature.enabled?(feature_name) + return unless Feature.enabled?(feature_name, default_enabled: :yaml) Gitlab::UsageDataCounters.count(event_name) rescue StandardError => error |