Skip to content

Commit

Permalink
update from codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Sep 19, 2024
1 parent 4bf97dd commit d8b55ca
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Rdmp.Core/CommandExecution/GoToCommandFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,20 +415,18 @@ public IEnumerable<IAtomicCommand> GetCommands(object forObject)
};

var obj = ExtractableCohortAuditLogBuilder.GetObjectIfAny(cohort, _activator.RepositoryLocator);
if (obj is not null)
if (obj is not null && obj is CohortIdentificationConfiguration configuration)
{
if(obj is CohortIdentificationConfiguration configuration)
yield return new ExecuteCommandShow(_activator, () =>
{
yield return new ExecuteCommandShow(_activator, () =>
{
return [configuration];
})
{
OverrideCommandName = "Cohort Identification Configuration(s)",
OverrideIcon = GetImage(RDMPConcept.CohortIdentificationConfiguration)
};
}
return [configuration];
})
{
OverrideCommandName = "Cohort Identification Configuration(s)",
OverrideIcon = GetImage(RDMPConcept.CohortIdentificationConfiguration)
};
}

}

//if it is a masquerader and masquerading as a DatabaseEntity then add a goto the object
Expand Down

0 comments on commit d8b55ca

Please sign in to comment.