diff --git a/lib/travis/api/v3/services/cron/create.rb b/lib/travis/api/v3/services/cron/create.rb index e676c158..494f263e 100644 --- a/lib/travis/api/v3/services/cron/create.rb +++ b/lib/travis/api/v3/services/cron/create.rb @@ -6,8 +6,8 @@ module Travis::API::V3 def run! raise LoginRequired unless access_control.logged_in? or access_control.full_access? raise InsufficientAccess unless Travis::Features.feature_active?(:cron) - raise NotFound unless repository = find(:repository) - raise NotFound unless branch = find(:branch, repository) + raise NotFound unless repository = find(:repository) + raise NotFound unless branch = find(:branch, repository) raise Error.new('Invalid value for interval. Interval must be "daily", "weekly" or "monthly"!', status: 422) unless ["daily", "weekly", "monthly"].include?(params["interval"]) access_control.permissions(repository).create_cron!