Skip to content

Commit

Permalink
fix: remove references to discussion comment table
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jan 15, 2022
1 parent 7b344fe commit 9e7fc78
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion app/api/discussion_comment_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class DiscussionCommentApi < Grape::API
error!(error: 'Attachment exceeds the maximum attachment size of 30MB.') unless File.size?(attached_file["tempfile"].path) < 30_000_000
end

logger.info("#{current_user.username} - added a reply to the discussion comment #{params[:discussion_comment_id]} for task #{task.id} (#{task_definition.abbreviation})")
logger.info("#{current_user.username} - added a reply to the discussion comment #{params[:task_comment_id]} for task #{task.id} (#{task_definition.abbreviation})")

if attached_file.nil? || attached_file.empty?
error!({ error: 'Discussion reply is empty, unable to add new reply to discussion comment' }, 403)
Expand Down
2 changes: 0 additions & 2 deletions db/migrate/20210910074614_switch_to_bigint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def change
change_column :task_comments, :task_id, :bigint
change_column :task_comments, :user_id, :bigint
change_column :task_comments, :recipient_id, :bigint
change_column :task_comments, :discussion_comment_id, :bigint
change_column :task_comments, :assessor_id, :bigint
change_column :task_comments, :task_status_id, :bigint
change_column :task_comments, :reply_to_id, :bigint
Expand Down Expand Up @@ -148,7 +147,6 @@ def change
# add_index :task_comments, :task_id
add_index :task_comments, :user_id
# add_index :task_comments, :recipient_id
# add_index :task_comments, :discussion_comment_id
add_index :task_comments, :assessor_id
add_index :task_comments, :task_status_id
# add_index :task_comments, :reply_to_id
Expand Down
2 changes: 0 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@
t.bigint "recipient_id"
t.string "content_type"
t.string "attachment_extension"
t.bigint "discussion_comment_id"
t.string "type"
t.datetime "time_discussion_started"
t.datetime "time_discussion_completed"
Expand All @@ -217,7 +216,6 @@
t.bigint "reply_to_id"
t.bigint "overseer_assessment_id"
t.index ["assessor_id"], name: "index_task_comments_on_assessor_id"
t.index ["discussion_comment_id"], name: "index_task_comments_on_discussion_comment_id"
t.index ["overseer_assessment_id"], name: "index_task_comments_on_overseer_assessment_id"
t.index ["recipient_id"], name: "fk_rails_1dbb49165b"
t.index ["reply_to_id"], name: "index_task_comments_on_reply_to_id"
Expand Down

0 comments on commit 9e7fc78

Please sign in to comment.