OpendataCH / Transport

Swiss public transport API
http://transport.opendata.ch/
MIT License
241 stars 50 forks source link

Use normal attribute variant for journey operator #142

Closed fabian closed 7 years ago

fabian commented 7 years ago

As reported in #140 the operator value sometimes varies because the attribute can have different variants, e.g.

  <JourneyAttribute from="0" to="10">
    <Attribute type="OPERATOR">
      <AttributeVariant type="SHORT">
        <Text>THU</Text>
      </AttributeVariant>
      <AttributeVariant type="NORMAL">
        <Text>THURBO</Text>
      </AttributeVariant>
      <AttributeVariant type="LONG">
        <Text>THURBO</Text>
      </AttributeVariant>
    </Attribute>
  </JourneyAttribute>

This change makes sure the NORMAL operator value is used.