Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing any settings is prevented when project has existing currency #1292

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

Turtle6665
Copy link
Contributor

@Turtle6665 Turtle6665 commented Mar 12, 2024

This PR fixes #1291.

Summary of the issue

It's a small fix to a small annoying bug : when a project as some bills, a default currency (different than "XXX") and you want to change the project settings an error message is shown : "Cannot change project currency because currency conversion is broken". The only way to change the project settings is then to remove the currency (set to "XXX"). Therefore, the error message is not constant with the behavior.

The new behavior

The default currency field is check against the current project default currency. If the project has bills and the new input default currency doesn't match the current one, the error "Cannot change project currency because currency conversion is broken" is shown.
I have tested the behavior. This is true for the API as well as the GUI input.

@Turtle6665
Copy link
Contributor Author

Turtle6665 commented Mar 13, 2024

One of the automatic test has failed (Test & Docs / build (3.12, normal, sqlite)). After reviewing the logs, I don't have any clue on what action to take. There seams to be looking for a non-existing module: 'distutils'. This doesn't seem to be related to my change.

@Turtle6665
Copy link
Contributor Author

Well, after a quick search on internet, I found out that distutils package is apparently removed in python version 3.12 (thanks to this Stack Overflow answer).

It cites the python 3.12 change log :

gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.

So a pip install setuptools should probably be added to the GitHub action for the python 3.12. Would this be better done on a different PR as it's a different issue @almet ? BTW, I'm not confident enough to successfully adapt the GitHub action, so I will let that to someone else to do.

@almet
Copy link
Member

almet commented Mar 15, 2024

Hey, thanks for the research on this. I find this particularly weird, because this seem already covered by #1258.

Including distutils in the dependencies might be the answer for the interim, even if I'm not sure why this is failing atm (with the fix already present in the released babel package)

@almet almet merged commit ba117ba into spiral-project:master Mar 15, 2024
16 of 17 checks passed
zorun pushed a commit that referenced this pull request Mar 19, 2024
@zorun
Copy link
Collaborator

zorun commented Mar 19, 2024

I just released 6.1.5 with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing any settings is prevented when project has existing currency
3 participants