Skip to content

Commit

Permalink
Fix import wizard (#11842)
Browse files Browse the repository at this point in the history
I think this fixes it (at least makes .com tests green), but we don't
have tests for this, so not sure if it doesn't break anything else.
@humitos you may want to test it locally.

ref
https://read-the-docs.sentry.io/issues/6127455073/?project=161479&query=is%3Aunresolved&referrer=issue-stream&sort=trends&statsPeriod=90d&stream_index=3

---------

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
  • Loading branch information
stsewd and humitos authored Dec 12, 2024
1 parent dcdae52 commit 400e17d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions readthedocs/projects/views/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,11 @@ def show_config_step(wizard):
don't show this step.
"""

# try to get the cleaned data of step 1
cleaned_data = wizard.get_cleaned_data_for_step("basics") or {}
# Try to get the cleaned data from the "basics" step only if
# we are in a step after it, otherwise, return True since we don't
# have the data yet, and django-forms calls this function multiple times.
basics_step = "basics"
cleaned_data = wizard.get_cleaned_data_for_step(basics_step) or {}
repo = cleaned_data.get("repo")
remote_repository = cleaned_data.get("remote_repository")
default_branch = cleaned_data.get("default_branch")
Expand Down

0 comments on commit 400e17d

Please sign in to comment.