Skip to content

Commit

Permalink
Fixed non-standard condition that tripped-up SQLite3.
Browse files Browse the repository at this point in the history
  • Loading branch information
kubitron committed Aug 26, 2012
1 parent 468ae98 commit d512172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/git_hosting/patches/users_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def edit_with_public_keys

# Add in values for viewing public keys:
def set_public_key_values
@gitolite_user_keys = @user.gitolite_public_keys.all(:order => 'title ASC, created_at ASC', :conditions => "active=1 && key_type=#{GitolitePublicKey::KEY_TYPE_USER}")
@gitolite_deploy_keys = @user.gitolite_public_keys.all(:order => 'title ASC, created_at ASC', :conditions => "active=1 && key_type=#{GitolitePublicKey::KEY_TYPE_DEPLOY}")
@gitolite_user_keys = @user.gitolite_public_keys.active.user_key.find(:all,:order => 'title ASC, created_at ASC')
@gitolite_deploy_keys = @user.gitolite_public_keys.active.deploy_key.find(:all,:order => 'title ASC, created_at ASC')
@gitolite_public_keys = @gitolite_user_keys + @gitolite_deploy_keys
@gitolite_public_key = @gitolite_public_keys.detect{|x| x.id == params[:public_key_id].to_i}
if @gitolite_public_key.nil?
Expand Down

0 comments on commit d512172

Please sign in to comment.