When a project as a default currency different from "XXX", changing the project settings will not be possible. An error is raised with the message : "Cannot change project currency because currency conversion is broken". The fact is that even if we don't want to change the currency, the message still shows up (same for the API).
For me, a better if statement could be (although I didn't test it):
if (
project is not None
and field.data != project.default_currency
and project.has_bills()
):
I know this was a hot fix waiting for improvement with the #1232 but checking for the current project default currency makes more sens considering the error message. This bug is annoying as to change the other settings, we have to set the currency to "no currency" as it's the only condition that doesn't raise this error.
When a project as a default currency different from "XXX", changing the project settings will not be possible. An error is raised with the message : "Cannot change project currency because currency conversion is broken". The fact is that even if we don't want to change the currency, the message still shows up (same for the API).
This comes from this if statement : https://github.com/spiral-project/ihatemoney/blob/2bb535070aae0f708856f727156c89ce857b85bb/ihatemoney/forms.py#L196-L204
For me, a better if statement could be (although I didn't test it):
I know this was a hot fix waiting for improvement with the #1232 but checking for the current project default currency makes more sens considering the error message. This bug is annoying as to change the other settings, we have to set the currency to "no currency" as it's the only condition that doesn't raise this error.