diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index c88e0c9..1600e12 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -497,7 +497,7 @@ # If no templates were available use the generic templates if @templates.empty? @msg = _("Using the generic Data Management Plan") - @templates << Template.find_by(is_default: true) + @templates << Template.where(is_default: true, published: true).first end @templates = @templates.sort{|x,y| x.title <=> y.title } if @templates.count > 1