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

Add project: use an instance variable to avoid 500 #11795

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

humitos
Copy link
Member

@humitos humitos commented Nov 25, 2024

@humitos humitos requested a review from a team as a code owner November 25, 2024 20:44
@humitos humitos requested a review from stsewd November 25, 2024 20:44
@humitos humitos force-pushed the humitos/add-project-wizard-config branch from 604cc88 to fae4fc0 Compare November 25, 2024 20:47
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you can use a condition_dict class attribute to define when to skip a step https://django-formtools.readthedocs.io/en/latest/wizard.html#formtools.wizard.views.WizardView.condition_dict.

@humitos
Copy link
Member Author

humitos commented Nov 28, 2024

I implemented it using condition_dict. It's not perfect because that method is called multiple times and that's kind of an issue for us due that we perform external API calls.

@humitos humitos requested a review from stsewd November 28, 2024 16:00
@stsewd
Copy link
Member

stsewd commented Dec 3, 2024

It's not perfect because that method is called multiple times and that's kind of an issue for us due that we perform external API calls.

Maybe it was fixed in the latest releases? Or maybe this is an open bug jazzband/django-formtools#134

@humitos
Copy link
Member Author

humitos commented Dec 3, 2024

We can improve/fix that bug later. I want to merge this because a lot of users are hitting this issue when importing projects.

Let's fix the immediate problem first and then we can polish it.

@humitos humitos requested a review from stsewd December 4, 2024 14:52
@humitos
Copy link
Member Author

humitos commented Dec 4, 2024

Based on this comment jazzband/django-formtools#134 (comment), the problem is not solved in master since they are still re-calculating all property by calling get_form_list().

@humitos
Copy link
Member Author

humitos commented Dec 4, 2024

Failing test looks unrelated, FAILED readthedocs/rtd_tests/tests/test_domains.py::FormTests::test_invalid_domains - ValueError: 'special' does not appear to be an IPv4 or IPv6 address

Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think we should try to update this dependency as well.

@humitos
Copy link
Member Author

humitos commented Dec 4, 2024

Yes. I'm doing that in another branch already 👍🏼

@humitos humitos merged commit 151582f into main Dec 4, 2024
3 of 5 checks passed
@humitos humitos deleted the humitos/add-project-wizard-config branch December 4, 2024 17:30
humitos added a commit that referenced this pull request Dec 9, 2024
Let's see if tests pass first. If so, we can remove the internal check
we added for conditional dict, and perform a manual import to check if
the notification is duplicated.

Related #11795
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.

Add project: error on wizard
2 participants