CosmicMind / CosmicMind/Graph

ERROR GRAPH CANCEL ROW IN LIST

Open
#164 7 comments 0 reactions 2 assignees Claimed by @adamdahan View on GitHub
graph help wanted Investigate
Dominant language
Swift
Stars
874
Forks
68
PR merge metrics
No merged PRs in 30d

Description

```swift
func cancella(at offset: IndexSet) {
guard let intindex = Array(offset).first else { return }
let id = dm.Storage[intindex].properties["id"] as? String ?? ""
DataManager.Shared.cancellaPosto(id)
}

func cancellaPosto(_ ID: String) {
let operazioneSearch = Search(graph: DB).where(.type("Posti") && "id" == ID)
let operazione = operazioneSearch.sync(completion: nil)

if let opeDaCanc = operazione.first {
opeDaCanc.delete()
if let index = Storage.firstIndex(of: opeDaCanc) {
self.Storage.remove(at: index)
self.objectWillChange.send()
}
}

DB.async {(Bool, error) in
if let e = error {
print(e.localizedDescription)
}
}
}
```
>Fatal error: [Graph Error: Cannot obtain permanent objectID]: file /Users/schulz/Desktop/POI MapNote/POI MapNote/Graph/ManagedNode.swift, line 40
2019-12-09 15:53:14.847221+0100 Simple List[48128:2685330] Fatal error: [Graph Error: Cannot obtain permanent objectID]: file /Users/schulz/Desktop/POI MapNote/POI MapNote/Graph/ManagedNode.swift, line 40

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.