summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-29 15:20:26 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-07 15:08:15 +0200
commit989785a31def17a1f0b29b84f8920db96ccf80b1 (patch)
treef25cbc4ef24eef81ce248a1a92cad46a2f40724e /lib/gitlab/background_migration
parent55f93db876f1bd62bde09d4003a0ef9a02adb04c (diff)
downloadgitlab-ce-989785a31def17a1f0b29b84f8920db96ccf80b1.tar.gz
Test if argument passed to a migration is present
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/migrate_build_stage_id_reference.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/migrate_build_stage_id_reference.rb b/lib/gitlab/background_migration/migrate_build_stage_id_reference.rb
index 87c6c4ed49f..711126ea0d3 100644
--- a/lib/gitlab/background_migration/migrate_build_stage_id_reference.rb
+++ b/lib/gitlab/background_migration/migrate_build_stage_id_reference.rb
@@ -2,7 +2,7 @@ module Gitlab
module BackgroundMigration
class MigrateBuildStageIdReference
def perform(id)
- raise ArgumentError unless id.is_a?(Integer)
+ raise ArgumentError unless id.present?
sql = <<-SQL.strip_heredoc
UPDATE "ci_builds" SET "stage_id" = (