Merge pull request #3697 from evazion/fix-3696
Fix #3696: API: handle boolean params consistently
This commit is contained in:
@@ -75,10 +75,6 @@ class TagAliasRequest
|
||||
end
|
||||
|
||||
def skip_secondary_validations=(v)
|
||||
if v == "1" or v == true or v =~ /t/
|
||||
@skip_secondary_validations = true
|
||||
else
|
||||
@skip_secondary_validations = false
|
||||
end
|
||||
@skip_secondary_validations = v.to_s.truthy?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -75,10 +75,6 @@ class TagImplicationRequest
|
||||
end
|
||||
|
||||
def skip_secondary_validations=(v)
|
||||
if v == "1" or v == true or v =~ /t/
|
||||
@skip_secondary_validations = true
|
||||
else
|
||||
@skip_secondary_validations = false
|
||||
end
|
||||
@skip_secondary_validations = v.to_s.truthy?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user