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 adding 2+ shows (that need searching) using Add Existing Show #4298

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

sharkykh
Copy link
Contributor

@sharkykh sharkykh commented Jun 2, 2018

Fixes the bug where after adding the first show you were redirected to the home page instead of the next show.

Make addShows/addNewShow return a redirection url instead of redirecting
Backported from #4267 and tweaked
Tested.

@OmgImAlexis Apologies.


# go to add the next show
return self.newShow(next_show_dir, rest_of_show_dirs)
return json_redirect(
'/addShows/newShow/',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't this also need the other query params like if the user wants auto settings or settings picked manually for each, etc?

Copy link
Contributor Author

@sharkykh sharkykh Jun 2, 2018

Choose a reason for hiding this comment

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

No, because the form on addShow/existingShows doesn't POST to this endpoint (addShow/addNewShow), but rather to addShow/addExistingShows (notice add at the start).
This ^ endpoint handles the promptForSettings stuff and then redirects us to the addShow/newShow page with the correct parameters. That's why the first show that needs searching always works.

It's only addShow/newShow that POSTs to addShow/addNewShow which needs this patch, at least for right now.

Copy link
Contributor

@medariox medariox left a comment

Choose a reason for hiding this comment

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

LGTM

@medariox medariox merged commit 6cbf102 into develop Jun 7, 2018
@medariox medariox deleted the bugfix/adding-existing-shows branch June 7, 2018 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants