// // RealmDecoding.swift // AutoCatCore // // Created by Selim Mustafaev on 12.02.2023. // import RealmSwift extension KeyedDecodingContainer { func decode(_ type: Persisted>.Type, forKey key: Key) throws -> Persisted> { // Use decode if present, falling back to an empty list try decodeIfPresent(type, forKey: key) ?? Persisted>(wrappedValue: List()) } }