Open RichardB9 opened 6 years ago
I agree. To me this seems more like bug. I guess that calling get_field_value()
directly bypasses the filter that is defined as a property on the lines object. Maybe the get_field_value()
method should be private in the first place. I'll check how the mechanism works to see how we can make field retrievals explicit.
Agree, probably the best to remove "get_field_value" and create a function to get a field value from the datasource behind the model.
The "get_filtered_field_value" should be hided, this makes the interface more clear.
It can be confusing when accessing data from a specific structure, the filter is not applied by default. For example:
I expect the two above lines to return the same values, i.e. all 'q' values of orifices, however the first line returns all 'lines' instead of the subset orifices. Instead I have to call
get_filtered_field_value('q')
to get the same result. It seems counter-intuitive to not apply theorifices
filter in the above example. This can be confusing for new users.