Fixed report docx generation [SCI-5837]

This commit is contained in:
Martin Artnik 2021-06-21 12:52:12 +02:00
parent bc1e307d30
commit 66d2e65114

View file

@ -5,7 +5,8 @@ module Reports::Docx::DrawMyModuleRepository
my_module = subject.my_module
repository = subject.repository
repository = assigned_repository_or_snapshot(my_module, repository)
return unless can_read_experiment?(@user, my_module.experiment) &&
return unless repository && can_read_experiment?(@user, my_module.experiment) &&
(repository.is_a?(RepositorySnapshot) || can_read_repository?(@user, repository))
repository_data = my_module.repository_docx_json(repository)