From 1db06b46f70d82dfdac85efef26d8a0f9ae04eb2 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Thu, 12 Aug 2021 13:45:38 +0200 Subject: [PATCH] Fixed for assets that belong to protocol step [SCI-5996] --- app/controllers/bio_eddie_assets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/bio_eddie_assets_controller.rb b/app/controllers/bio_eddie_assets_controller.rb index 37f8b2986..a9d5e0ce7 100644 --- a/app/controllers/bio_eddie_assets_controller.rb +++ b/app/controllers/bio_eddie_assets_controller.rb @@ -137,7 +137,7 @@ class BioEddieAssetsController < ApplicationController activity_type: :register_molecule, owner: current_user, team: asset.team, - project: asset.my_module.experiment.project, + project: asset&.my_module&.experiment&.project, subject: asset, message_items: { description: asset.blob.metadata['description'],