mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-16 01:54:34 +08:00
Merge pull request #5215 from artoscinote/ma_SCI_8212
Properly handle repository snapshots in reports [SCI-8212]
This commit is contained in:
commit
e3a0f3c55f
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ module ReportActions
|
|||
my_module_element = save_element!({ 'my_module_id' => my_module.id }, :my_module, experiment_element)
|
||||
|
||||
my_module.live_and_snapshot_repositories_list.each do |repository|
|
||||
next unless @repositories.include?(repository.id)
|
||||
next unless @repositories.include?(repository.parent_id || repository.id)
|
||||
|
||||
save_element!(
|
||||
{ 'my_module_id' => my_module.id, 'repository_id' => repository.id },
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<span class="sci-checkbox-container">
|
||||
<input type="checkbox"
|
||||
class="sci-checkbox repositories-setting"
|
||||
value="<%= repository.id %>"
|
||||
value="<%= repository.is_a?(RepositorySnapshot) ? repository.parent_id : repository.id %>"
|
||||
<%= 'checked' if report.new_record? ||
|
||||
@project_contents[:repositories].include?(repository.id) ||
|
||||
(repository.is_a?(Repository) && repository.repository_snapshots.exists?(id: @project_contents[:repositories])) %> />
|
||||
|
|
Loading…
Add table
Reference in a new issue