Fix working with BaseConditionChoice.default_value_field functions.
Review Request #8352 — Created Aug. 26, 2016 and submitted — Latest diff uploaded
BaseConditionChoice.default_value_field
is allowed to be a function,
butBaseConditionOperator.value_field
wasn't handling this case,
breaking some operators/choices. It now checks if it's a function
and calls it.
BaseConditionOperator.has_custom_value_field
has been reworked
accordingly, checking if the definitions on the class stray from the
defaults for operators, rather than checking the results of the
properties/functions being called. Without this fix, an operator could
be using the choice's default, but it wouldn't look like it, as it'd
get two different instances during the comparison.A unit test has been added for these changes.
Unit tests pass.