Skip to content

Commit

Permalink
Fixed bug in cached dashboard data
Browse files Browse the repository at this point in the history
  • Loading branch information
markwemekamp committed Oct 21, 2016
1 parent f1818d2 commit 7032527
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/RankOne.SEO.Tool/Controllers/RankOneApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ private void GetPageScores(IEnumerable<HiearchyNode> nodeHierarchy)
{
foreach (var node in nodeHierarchy)
{
if (node.NodeInformation.TemplateId > 0 || node.HasChildrenWithTemplate)
var nodeReport = _nodeReportRepository.GetById(node.NodeInformation.Id);
if (nodeReport != null)
{
var nodeReport = _nodeReportRepository.GetById(node.NodeInformation.Id);
if (nodeReport != null)
if (node.NodeInformation.TemplateId == 0)
{
_nodeReportRepository.Delete(nodeReport);
}
if (node.NodeInformation.TemplateId > 0 || node.HasChildrenWithTemplate)
{
node.FocusKeyword = nodeReport.FocusKeyword;
try
Expand Down Expand Up @@ -155,7 +159,7 @@ private List<HiearchyNode> GetHierarchy(IEnumerable<IPublishedContent> nodeColle
var nodeHiearchyCollection = new List<HiearchyNode>();
foreach (var node in nodeCollection)
{

var nodeHierarchy = new HiearchyNode
{
NodeInformation = new NodeInformation
Expand Down

0 comments on commit 7032527

Please sign in to comment.