trivial: this is hard to read, could you maybe assign the attribute values to a variable and then use those so it's easier to see where the ternary is.