Skip to content

Commit

Permalink
revert parameter change
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhcfl committed Aug 20, 2024
1 parent 37674a1 commit f33015f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/discourse_data_explorer/parameter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module ::DiscourseDataExplorer
class Parameter
attr_accessor :identifier, :type, :default, :nullable

def initialize(identifier, type, default, nullable, check: true)
def initialize(identifier, type, default, nullable)
unless identifier
raise ValidationError.new("Parameter declaration error - identifier is missing")
end
Expand All @@ -25,7 +25,7 @@ def initialize(identifier, type, default, nullable, check: true)
@default = default
@nullable = nullable
begin
cast_to_ruby default if default.present? && check
cast_to_ruby default if default.present?
rescue ValidationError
raise ValidationError.new(
"Parameter declaration error - the default value is not a valid #{type}",
Expand Down Expand Up @@ -89,7 +89,7 @@ def self.create_from_sql(sql, opts = {})
type = type.strip

begin
ret_params << Parameter.new(ident, type, default, nullable, check: false)
ret_params << Parameter.new(ident, type, default, nullable)
rescue StandardError
raise if opts[:strict]
end
Expand Down

0 comments on commit f33015f

Please sign in to comment.