Skip to content

Commit

Permalink
[webui] Always order project architectures by name
Browse files Browse the repository at this point in the history
Before they where ordered by position from repository_architectures
  • Loading branch information
hennevogel committed Jul 7, 2016
1 parent 50f8d1c commit 8dfd6f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/app/controllers/webui/project_controller.rb
Expand Up @@ -318,7 +318,7 @@ def repositories
@debuginfo = @project.get_flags('debuginfo')
@publish = @project.get_flags('publish')
@useforbuild = @project.get_flags('useforbuild')
@architectures = @project.architectures.uniq
@architectures = @project.architectures.reorder('name').uniq
end

def repository_state
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/mixins/get_flags.rb
Expand Up @@ -13,7 +13,7 @@ def get_flags(flag_type)
[nil].concat(self.repositories.pluck(:name)).each do |repository|
the_flags[repository] = []
# [nil] is a placeholder for "all" architectures
[nil].concat(self.architectures.uniq).each do |architecture|
[nil].concat(self.architectures.reorder('name').uniq).each do |architecture|
architecture_id = architecture ? architecture.id : nil
flag = self.flags.where(flag: flag_type).where(repo: repository).where(architecture_id: architecture_id).first
# If there is no flag create a temporary one.
Expand Down

0 comments on commit 8dfd6f6

Please sign in to comment.