diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index e323bed65..10553a6a8 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -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