Skip to content

Commit 97e98e0

Browse files
Fix delete stimTargetParams rule
1 parent 5c49055 commit 97e98e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

webapp/components/definition/stimulationTargets/NetPyNEStimulationTarget.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export default class NetPyNEStimulationTarget extends React.Component {
6666
if (stimSourceName === undefined) {
6767
try {
6868
const NETPYNE_OBJ = "netpyne_geppetto.netParams.stimTargetParams"
69-
const SAFE_QUERY = `${NETPYNE_OBJ}['${stimName}']['source'] if "${stimName}" in ${NETPYNE_OBJ} else ''`
69+
const STIM_TARGET_OBJ = `${NETPYNE_OBJ}['${stimName}']`
70+
const SAFE_QUERY = `${STIM_TARGET_OBJ}['source'] if "${stimName}" in ${NETPYNE_OBJ} and "source" in ${STIM_TARGET_OBJ} else ''`
7071
stimSourceName = await Utils.evalPythonMessage(SAFE_QUERY)
7172
} catch (error){
7273
console.log(error)

0 commit comments

Comments
 (0)