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

Fix API for member edition #1261

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix API for member edition #1261

wants to merge 4 commits into from

Conversation

almet
Copy link
Member

@almet almet commented Nov 12, 2023

Fix for #1259. To merge after #1260.

  • Add a test showcasing the problem
  • Find and implement a fix

@almet
Copy link
Member Author

almet commented Nov 12, 2023

I can run the failing test with

.venv/bin/pytest -W ignore::DeprecationWarning ihatemoney/tests/api_test.py -k test_member_edition_keep_data -s

@almet
Copy link
Member Author

almet commented Nov 12, 2023

From what I understand:

  • When no data is provided, the form falls back to its default values, rather than using the already-present data
  • There is an extra form.fill(member) method on the form, which job is to explicitely do this. It's used in the web.py views

@almet almet changed the title Replace Fred by Jeanne in tests and examples Fix API for member edition Nov 12, 2023
@almet
Copy link
Member Author

almet commented Nov 12, 2023

This is actually manyfold.

@almet almet marked this pull request as ready for review November 12, 2023 19:41
Base automatically changed from almet/test-jeanne to master November 12, 2023 23:47
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.

None yet

1 participant