Commit 48a5f216 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'update-ff-iid-params' into 'master'

Update FeatureFlag has_internal_id Parameters

See merge request gitlab-org/gitlab!34666
parents dd49e6bf 04f3778f
...@@ -9,7 +9,7 @@ module Operations ...@@ -9,7 +9,7 @@ module Operations
belongs_to :project belongs_to :project
has_internal_id :iid, scope: :project, init: ->(s) { s&.project&.operations_feature_flags&.maximum(:iid) }, backfill: true, presence: false has_internal_id :iid, scope: :project, init: ->(s) { s&.project&.operations_feature_flags&.maximum(:iid) }
default_value_for :active, true default_value_for :active, true
......
...@@ -58,7 +58,7 @@ RSpec.describe Operations::FeatureFlag do ...@@ -58,7 +58,7 @@ RSpec.describe Operations::FeatureFlag do
end end
end end
it_behaves_like 'AtomicInternalId', validate_presence: false do it_behaves_like 'AtomicInternalId', validate_presence: true do
let(:internal_id_attribute) { :iid } let(:internal_id_attribute) { :iid }
let(:instance) { build(:operations_feature_flag) } let(:instance) { build(:operations_feature_flag) }
let(:scope) { :project } let(:scope) { :project }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment