Fix to models check
This commit is contained in:
parent
0d0a6c4a81
commit
cd374bfacc
@ -205,7 +205,7 @@ public extension UnkeyedDecodingContainer {
|
|||||||
// Iterate and decode each.
|
// Iterate and decode each.
|
||||||
while !containerCopy.isAtEnd {
|
while !containerCopy.isAtEnd {
|
||||||
let nestedContainer = try containerCopy.nestedContainer(keyedBy: AnyCodingKey.self)
|
let nestedContainer = try containerCopy.nestedContainer(keyedBy: AnyCodingKey.self)
|
||||||
if let identifier = try nestedContainer.decodeIfPresent(String.self, forKey: typeCodingKey) {
|
let identifier = try nestedContainer.decode(String.self, forKey: typeCodingKey)
|
||||||
guard let type = ModelRegistry.getType(for: identifier, with: T.self) else {
|
guard let type = ModelRegistry.getType(for: identifier, with: T.self) else {
|
||||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderErrorModelNotMapped: \(identifier)")
|
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderErrorModelNotMapped: \(identifier)")
|
||||||
throw ModelRegistry.Error.decoderErrorModelNotMapped
|
throw ModelRegistry.Error.decoderErrorModelNotMapped
|
||||||
@ -219,7 +219,6 @@ public extension UnkeyedDecodingContainer {
|
|||||||
throw ModelRegistry.Error.decoderError
|
throw ModelRegistry.Error.decoderError
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return models
|
return models
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user