Fix missing team at the StepTable creation [SCI-8036] (#5090)

This commit is contained in:
ajugo 2023-03-07 11:26:57 +01:00 committed by GitHub
parent 7584242745
commit 6471dbed5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,8 @@ module StepElements
Table.new(
name: t('protocols.steps.table.default_name', position: @step.step_tables.length + 1),
contents: { data: Array.new(5, Array.new(5, '')) }.to_json,
created_by: current_user
created_by: current_user,
team: @step.protocol.team
))
ActiveRecord::Base.transaction do