Skip to content

Commit

Permalink
correctly use Variant as subject of AcceptRevisionsActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Oct 30, 2024
1 parent 509ccd1 commit 76042f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/app/models/activities/accept_revisions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ def initialize(accepting_user:, revisions:, organization_id: nil, note:)

private
def create_activity
#Set the subject of this activity to the subject of the revision's creation activity
#In the case of gene/exon coordinates, the revision's subject will be the coordinate Object
#which we do not want. The creation activity's subject will be the Variant.
activity_subject = revisions.first&.creation_activity&.subject
@activity = AcceptRevisionsActivity.create!(
subject: revisions.first.subject,
subject: activity_subject,
user: accepting_user,
organization: organization,
note: note
Expand Down

0 comments on commit 76042f9

Please sign in to comment.