Skip to content

Commit

Permalink
default submission_tags to an empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwoldatwork committed Oct 4, 2023
1 parent e4c8e07 commit 7e6b9dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/submissions/_submissions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<%= render 'admin/forms/ui_form', form: form %>
</div>

<% if @tags && @tags.first %>
<% if @tags.any? %>
<div class="well">
<div class="field">
<p>
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20231003181018_add_form_submission_tags.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AddFormSubmissionTags < ActiveRecord::Migration[7.0]
def change
add_column :forms, :submission_tags, :string, array: true, comment: "cache the form's submissions tags for reporting"
add_column :forms, :submission_tags, :string, array: true, default: [], comment: "cache the form's submissions tags for reporting"
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
t.string "whitelist_url_7"
t.string "whitelist_url_8"
t.string "whitelist_url_9"
t.string "submission_tags", comment: "cache the form's submissions tags for reporting", array: true
t.string "submission_tags", default: [], comment: "cache the form's submissions tags for reporting", array: true
t.index ["legacy_touchpoint_id"], name: "index_forms_on_legacy_touchpoint_id"
t.index ["legacy_touchpoint_uuid"], name: "index_forms_on_legacy_touchpoint_uuid"
t.index ["organization_id"], name: "index_forms_on_organization_id"
Expand Down

0 comments on commit 7e6b9dd

Please sign in to comment.