Skip to content

Commit

Permalink
fix(helpers): handle explicitly provided validate argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed Nov 6, 2024
1 parent 65575f5 commit 7ee10d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
7 changes: 6 additions & 1 deletion neuroml/nml/helper_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,12 @@ def add_membrane_property(self, property_name, **kwargs):
"""
self.setup_nml_cell(use_convention=False)
prop = self.biophysical_properties.membrane_properties.add(property_name, validate=False, **kwargs)
if "validate" in kwargs.keys():
prop = self.biophysical_properties.membrane_properties.add(property_name, **kwargs)
else:
prop = self.biophysical_properties.membrane_properties.add(property_name, validate=False, **kwargs)
return prop
Expand Down
15 changes: 11 additions & 4 deletions neuroml/nml/nml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Oct 16 16:26:54 2024 by generateDS.py version 2.44.1.
# Generated Wed Nov 6 11:43:32 2024 by generateDS.py version 2.44.1.
# Python 3.11.10 (main, Sep 9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)]
#
# Command line options:
Expand Down Expand Up @@ -49401,9 +49401,16 @@ def add_membrane_property(self, property_name, **kwargs):

"""
self.setup_nml_cell(use_convention=False)
prop = self.biophysical_properties.membrane_properties.add(
property_name, validate=False, **kwargs
)

if "validate" in kwargs.keys():
prop = self.biophysical_properties.membrane_properties.add(
property_name, **kwargs
)
else:
prop = self.biophysical_properties.membrane_properties.add(
property_name, validate=False, **kwargs
)

return prop

def add_channel_density_v(
Expand Down

0 comments on commit 7ee10d8

Please sign in to comment.