Skip to content

Commit

Permalink
fix: Fix db triggers not running for assessment submission notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Junyi00 committed Mar 13, 2023
1 parent 8994947 commit b93cdbd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Cadet.Repo.Migrations.AddAssessmentSubmissionNotificationType do

def up do
execute(
"INSERT INTO notification_types (name, template_file_name, is_autopopulated, inserted_at, updated_at) VALUES ('ASSESSMENT SUBMISSION', 'assessment_submission', TRUE, current_timestamp, current_timestamp)"
"INSERT INTO notification_types (name, template_file_name, is_autopopulated, inserted_at, updated_at) VALUES ('ASSESSMENT SUBMISSION', 'assessment_submission', FALSE, current_timestamp, current_timestamp)"
)
end

Expand Down
10 changes: 0 additions & 10 deletions test/cadet/jobs/notification_worker/notification_worker_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ defmodule Cadet.NotificationWorker.NotificationWorkerTest do
{_name, data} = Enum.at(assessments.assessments, 0)
submission = List.first(List.first(data.mcq_answers)).submission

assessment_config = submission.assessment.config
course = assessment_config.course

insert(:notification_config,
notification_type: asssub_ntype,
course: course,
assessment_config: assessment_config,
is_enabled: true
)

# setup for avenger backlog
ungraded_submissions =
Jason.decode!(
Expand Down

0 comments on commit b93cdbd

Please sign in to comment.