Closed psongers closed 8 months ago
@psongers Hi
That is the intended behavior that a sub-model inherits the namespace from its parent.
But there is indeed a bug: empty entity namespace and empty model namespace are ignored since bool('') is False
the fix should be like this:
if ctx.entity_ns is not None:
ns = ctx.entity_ns
elif model_cls.__xml_ns__ is not None:
ns = model_cls.__xml_ns__
else:
ctx.parent_ns
@psongers Hi
That is the intended behavior that a sub-model inherits the namespace from its parent. But there is indeed a bug: empty entity namespace and empty model namespace are ignored since
bool('') is False
the fix should be like this:
if ctx.entity_ns is not None: ns = ctx.entity_ns elif model_cls.__xml_ns__ is not None: ns = model_cls.__xml_ns__ else: ctx.parent_ns
gotchya. that makes sense. I'll update this PR
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
9e2b126
) 91.65% compared to head (2137120
) 91.63%.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
fixes issue #137