fixed encodeIfPresent
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
52844cd5e1
commit
9c34ea267e
@ -50,7 +50,7 @@ public class ClearFormFieldEffectModel: FormFieldEffectProtocol {
|
|||||||
public func encode(to encoder: Encoder) throws {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encode(fieldKey, forKey: .fieldKey)
|
try container.encode(fieldKey, forKey: .fieldKey)
|
||||||
try container.encode(activatedRuleIds, forKey: .activatedRuleIds)
|
try container.encodeIfPresent(activatedRuleIds, forKey: .activatedRuleIds)
|
||||||
try container.encodeModels(rules, forKey: .rules)
|
try container.encodeModels(rules, forKey: .rules)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user