Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Jul 26, 2023
1 parent e49ea69 commit 3924320
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/podcast_planner_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def planner_params
p = permit_params
p[:podcast_id] = @podcast.id
p[:date_range_condition] = p[:number_of_episodes].present? ? "episodes" : "date"
p[:segment_count] = p[:ad_breaks] + 1 if p[:ad_breaks].present?
p[:segment_count] = p[:ad_breaks].to_i + 1 if p[:ad_breaks].present?

# translate selected weeks into monthly weeks
monthly_weeks = monthly_week_options(p[:selected_weeks])
Expand Down
2 changes: 1 addition & 1 deletion app/models/podcast_planner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def generate_dates_by_end_date
def ready_to_generate_drafts?
@dates.present? &&
@publish_time.present? &&
@segment_count.present? &&
(@segment_count.present? || @medium === "video") &&
@medium.present?
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/podcast_planner/_form_draft.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<%= t(".title.calendar") %>
</h5>

<button type="submit" class="btn btn-primary d-inline" disabled data-planner-target="button">
<button type="submit" class="btn btn-primary d-inline" disabled data-planner-target="button" data-turbo="false">
<%= t(".label.create") %>
<span data-planner-target="count"><%= @planner.dates&.count.to_i %></span>
<span data-planner-target="label" data-singular="<%= t(".label.draft") %>" data-plural="<%= t(".label.draft").pluralize %>">
Expand Down

0 comments on commit 3924320

Please sign in to comment.