Closed soininen closed 2 years ago
Sorry about that! I removed a lot of boilerplate recently but didn't anticipate that. The DBCheckMixin._manage_stocks
method should pick the current element from the database so only updated fields are necessary... What did I miss?
It's just the error message that confused me when I noticed that FlexTool3 web interface's unit tests were suddenly broken.
Makes me actually wonder if the change was intended? Previoulsy spinedb_api
would happily fall back to 'Base' alternative but now I get an exception. On the other hand, I'm OK with with having to provide an alternative id which forces me to take a stance regarding the fall back id.
I think I get it now: it's not the error message only, but we now require more information in items when calling update_parameter_values()
. I'm not so happy with having to provide that redundant information when the parameter value can be identified solely by its id. Can we revert the change?
I can fix this.
Previoulsy spinedb_api would happily fall back to 'Base' alternative but now I get an exception
Did it? I'm not sure if that would be correct?
Did it? I'm not sure if that would be correct?
Sorry, forget about that comment. I was confused of what was going on here.
Might work better in latest master. Unfortunately I forgot to pull before pushing so now we have a merge commit. Please let me know if there are still issues.
I also added a couple of tests.
Great! The value update tests in Flextool3 interface now pass. Other tests fail, though, need to investigate them next... I think we are done here, though. Thanks a lot, @manuelma!
Semantics of
update_parameter_values()
seems to have changed such that it breaks client code: items passed to the method are now required to includealternative_id
field. However, the exception raised incheck_parameter_value()
says that 'Alternative not found'. We should fix it to say 'Missing alternative identifier` instead.