Skip to content

Commit

Permalink
pull non draft states into a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
caitmich committed Sep 11, 2024
1 parent 22f1f93 commit 151b2d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/export_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ def index

def non_draft_records?
issue_states = current_project.issues.pluck(:state).uniq
(issue_states & ['published', 'ready_for_review']).any?
non_draft_states = ['published', 'ready_for_review']

(issue_states & non_draft_states).any?
end

# In case something goes wrong with the export, fail graciously instead of
Expand Down

0 comments on commit 151b2d3

Please sign in to comment.