Merge pull request #4776 from artoscinote/ma_SCI_7653

Fix display of archived tasks [SCI-7653]
This commit is contained in:
artoscinote 2023-01-10 11:56:48 +01:00 committed by GitHub
commit 288c255c44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ class ExperimentsController < ApplicationController
@current_sort = view_state.state.dig('my_modules', view_mode, 'sort') || 'atoz'
@project = @experiment.project
@my_modules = if @experiment.archived?
@my_modules = if @experiment.archived_branch?
@experiment.my_modules.order(:name)
elsif params[:view_mode] == 'archived'
@experiment.my_modules.archived.order(:name)
@ -107,7 +107,7 @@ class ExperimentsController < ApplicationController
def load_table
my_modules = @experiment.my_modules.readable_by_user(current_user)
unless @experiment.archived?
unless @experiment.archived_branch?
my_modules = params[:view_mode] == 'archived' ? my_modules.archived : my_modules.active
end