mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
Fix global search for inventories (#1988)
This commit is contained in:
parent
5adb745743
commit
d741e52427
|
@ -311,7 +311,7 @@ class RepositoriesController < ApplicationController
|
||||||
def load_parent_vars
|
def load_parent_vars
|
||||||
@team = current_team
|
@team = current_team
|
||||||
render_404 unless @team
|
render_404 unless @team
|
||||||
@repositories = Repository.accessible_by_teams(@team)
|
@repositories = Repository.accessible_by_teams(@team).order('repositories.created_at ASC')
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_team
|
def check_team
|
||||||
|
|
|
@ -36,7 +36,6 @@ class Repository < ApplicationRecord
|
||||||
'OR team_repositories.team_id IN (?) '\
|
'OR team_repositories.team_id IN (?) '\
|
||||||
'OR repositories.shared = true', teams, teams)
|
'OR repositories.shared = true', teams, teams)
|
||||||
.distinct
|
.distinct
|
||||||
.order(:created_at)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def self.search(
|
def self.search(
|
||||||
|
|
Loading…
Reference in a new issue