Fixing error when osago status in nil

This commit is contained in:
Selim Mustafaev 2024-03-31 22:42:40 +03:00
parent c330557604
commit ed258ed8f3
3 changed files with 4 additions and 4 deletions

View File

@ -1158,7 +1158,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 123; CURRENT_PROJECT_VERSION = 124;
DEVELOPMENT_TEAM = 46DTTB8X4S; DEVELOPMENT_TEAM = 46DTTB8X4S;
INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_FILE = AutoCat/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = AutoCat; INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
@ -1186,7 +1186,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 123; CURRENT_PROJECT_VERSION = 124;
DEVELOPMENT_TEAM = 46DTTB8X4S; DEVELOPMENT_TEAM = 46DTTB8X4S;
INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_FILE = AutoCat/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = AutoCat; INFOPLIST_KEY_CFBundleDisplayName = AutoCat;

View File

@ -26,7 +26,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = Realm.Configuration( let config = Realm.Configuration(
schemaVersion: 41, schemaVersion: 42,
migrationBlock: { migration, oldSchemaVersion in migrationBlock: { migration, oldSchemaVersion in
if oldSchemaVersion <= 31 { if oldSchemaVersion <= 31 {
migration.enumerateObjects(ofType: "Vehicle") { old, new in migration.enumerateObjects(ofType: "Vehicle") { old, new in

View File

@ -7,7 +7,7 @@ public class Osago: Object, Decodable, Cloneable {
@Persisted public var vin: String? @Persisted public var vin: String?
@Persisted public var plateNumber: String? @Persisted public var plateNumber: String?
@Persisted public var name: String = "" @Persisted public var name: String = ""
@Persisted public var status: String = "" @Persisted public var status: String?
@Persisted public var restrictions: String = "" @Persisted public var restrictions: String = ""
@Persisted public var insurant: String? @Persisted public var insurant: String?
@Persisted public var owner: String? @Persisted public var owner: String?