Skip to content

Conversation

@william-vw
Copy link

When having a single unitMagnitude as in

<Rule path="/data[at0001]/events[at0002]/data[at0003]/items[at0004]">
    <constraint xsi:type="tem:quantityConstraint">
        <excludedUnits>[in_i]</excludedUnits>
        <unitMagnitude>
            <unit>cm</unit>
            <maxMagnitude>1000.0</maxMagnitude>
            <minMagnitude>0.0</minMagnitude>
            <includesMaximum>true</includesMaximum>
            <includesMinimum>true</includesMinimum>
        </unitMagnitude>
    </constraint>
</Rule>

The code would add the unit-magnitude in the appropriate if-block but also at the end of the method, meaning the same unit-magnitude is added twice.

This fix simply returns in the if-block to avoid this behavior.

@william-vw william-vw changed the title initial commit Fix cases with single unit-magnitude in template Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant