diff options
Diffstat (limited to 'app/models/terraform/state.rb')
-rw-r--r-- | app/models/terraform/state.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/terraform/state.rb b/app/models/terraform/state.rb index e5c8f4ab32a..8a207c891e2 100644 --- a/app/models/terraform/state.rb +++ b/app/models/terraform/state.rb @@ -28,7 +28,7 @@ module Terraform validates :uuid, presence: true, uniqueness: true, length: { is: UUID_LENGTH }, format: { with: HEX_REGEXP, message: 'only allows hex characters' } - default_value_for(:uuid, allows_nil: false) { SecureRandom.hex(UUID_LENGTH / 2) } + attribute :uuid, default: -> { SecureRandom.hex(UUID_LENGTH / 2) } def latest_file latest_version&.file |