diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 13:38:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 13:38:24 +0000 |
commit | 0396082c12f518f48e136968dbf0b4e5f774641c (patch) | |
tree | 9ee22b3f2d65483c316d30397b7e065d4dec5fec /app | |
parent | cb7e80d1211dae947e40290a834cbe29ee36364e (diff) | |
download | gitlab-ce-0396082c12f518f48e136968dbf0b4e5f774641c.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-ee
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/ci_secure_files/index.js | 5 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci_secure_files/index.js b/app/assets/javascripts/ci_secure_files/index.js index 3944286dc60..3a28e7f8e33 100644 --- a/app/assets/javascripts/ci_secure_files/index.js +++ b/app/assets/javascripts/ci_secure_files/index.js @@ -4,6 +4,11 @@ import SecureFilesList from './components/secure_files_list.vue'; export const initCiSecureFiles = (selector = '#js-ci-secure-files') => { const containerEl = document.querySelector(selector); + + if (!containerEl) { + return false; + } + const { projectId } = containerEl.dataset; const { admin } = containerEl.dataset; const { fileSizeLimit } = containerEl.dataset; diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 78b55680b5e..95c6da4a7af 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -1314,6 +1314,8 @@ module Ci raise ArgumentError, 'pipeline not fully loaded' end + return 0 unless created_at + (Time.current - created_at).ceil / 60 end |