mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 12:23:31 +00:00
Add check for when can't find parent ID and write to severe error log
This commit is contained in:
parent
04fa5395d3
commit
5c0677b923
1 changed files with 5 additions and 0 deletions
|
@ -283,6 +283,11 @@ class EntryManagerService extends ChangeNotifier {
|
|||
final parentParentPostId = _postNodes.containsKey(item.parentId)
|
||||
? item.parentId
|
||||
: _parentPostIds[item.parentId];
|
||||
if (_postNodes[parentParentPostId] == null) {
|
||||
_logger.severe(
|
||||
'Error finding parent ${item.parentId} for entry ${item.id}');
|
||||
continue;
|
||||
}
|
||||
final parentPostNode = _postNodes[parentParentPostId]!;
|
||||
postNodesToReturn.add(parentPostNode);
|
||||
_parentPostIds[item.id] = parentPostNode.id;
|
||||
|
|
Loading…
Reference in a new issue