-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Currency symbol setting not being saved #652
Comments
I can't reproduce the issue on demo.partkeepr.org I went to demo.partkeepr.org, clicked User Preferences->Currency->Set Currency to $, Clicked Save, reloaded the app and the new currency was in place. |
You did not specify the PartKeepr version you use. Please have a look at CONTRIBUTING.md |
Ubuntu server 14.04.4 Also occurred on commit 28edd48, before I updated this morning. Main difference I can see to demo.partkeepr.org is that the demo site does not require a login (the issue was resetting after a subsequent login) - and this is relevant to user preferences. |
Actually the demo site uses a login, but the login values are hard-coded, so the login process is exactly the same. The only thing I can think of which could cause the issue is that you might have skipped re-running setup, which is important to re-generate the compiled JS files. Have you re-ran setup after updating? |
Yes, went through the setup again. My knowledge of mysql is limited, but further testing reveals that pressing "save" on the user preferences dialog does not add a database row to the UserPreference table if the field is "$" (and there wasn't one already). The issue disappears if you then try and set the symbol to something else, say "A", (which happily creates the correct partkeepr.formatting.currency.symbol row), after which setting it to "$" works correctly. Therefore, to reproduce, delete the partkeepr.formatting.currency.symbol database row for the relevant user, re-login to PartKeepr, then try to set the Currency Symbol setting to "$". The relevant sql database entry will not be created, and upon refreshing PartKeepr it reverts back to the default symbol. |
Do you have your installation available over the internet and if so, can you create a user so that I can try to reproduce the issue myself? |
Nevermind, I found out how to reproduce the issue. |
Force save on a newly created user preference, fixes #652
I just fixed the issue, can you test it? |
I'm curious as to why the "$" character was being treated differently, but yes, forcing a save (your fix) successfully solves the issue, thanks! |
I believe it isn't treated differently. The main issue was that user preferences which don't exist won't get created properly. |
After setting the currency symbol to "$", every time I login again it is reset to "€". Other formatting settings (precision, symbol placement) are being saved correctly.
The text was updated successfully, but these errors were encountered: