mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Properly handle repository snapshots in reports [SCI-8212]
This commit is contained in:
parent
8f9e028577
commit
f48350c6ea
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…
Reference in a new issue