Allow overwrite of constructor arguments to return None #178
Labels
category: bug
errors in the code or code behavior
category: enhancement
improvements of code or code behavior
priority: low
alternative solution already working and/or relevant to only specific user(s)
Milestone
When customizing in the ObjectMapper the mapping for a constructor argument, the mapping is ignored if the function returns None. E.g.,
will always be ignored. This is due to the following:
hdmf/src/hdmf/build/map.py
Lines 1204 to 1210 in 44c02ea
Here the check
if override is not None:
is used to check if a constructor argument is overwritten or not. Instead the check should look for whether a custom mapping is defined, rather than using the None return value as an indicator that there is no overwrite.Proposed solution Add function has_overwrite_carg to check if a constuctor argument is overwritten and use it instead.
Checklist
The text was updated successfully, but these errors were encountered: