Skip to content

Commit f89555f

Browse files
committed
Fix issue with fast delete of field content
When a field content is deleted too quickly (before the sync mechanism happens), an exception is raised in the Python side. This behavior doesn't occur if you type a value in a field, wait a little bit that the sync happens, and delete it. What's happening is that the code related to the netpyne field tries to delete a key that doesn't exists yet (see the video below). The fix removes this behavior (see video below)
1 parent e9f7d5e commit f89555f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

webapp/components/general/NetPyNEField.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ export default class NetPyNEField extends Component {
4646
!this.model.split('.')[0].startsWith('simConfig')
4747
|| this.model.split('.')[1].startsWith('analysis')
4848
) {
49-
Utils.execPythonMessage(`del netpyne_geppetto.${this.model}`);
49+
Utils.execPythonMessage(`
50+
try:
51+
del netpyne_geppetto.${this.model}
52+
except KeyError:
53+
...`);
5054
}
5155
}
5256
return value;

0 commit comments

Comments
 (0)