fixed small issue mapping members

This commit is contained in:
James Lopez 2016-05-19 17:02:49 +02:00
parent 38b92fe87b
commit dd86c91c73
2 changed files with 3 additions and 4 deletions

View file

@ -25,7 +25,6 @@ module Gitlab
def default_project_member
@default_project_member ||=
begin
return @project.project_members.first.user.id unless @project.project_members.empty?
default_member = ProjectMember.new(default_project_member_hash)
default_member.save!
default_member.user.id

View file

@ -39,11 +39,11 @@ module Gitlab
def update_missing_author(relation_hash, members_map, user_admin)
old_author_id = relation_hash['author_id']
# Users with admin access have access to mapping of users
# Users with admin access can map users
if user_admin
relation_hash['author_id'] = members_map.default_project_member
else
relation_hash['author_id'] = members_map.map[old_author_id]
else
relation_hash['author_id'] = members_map.default_project_member
end
author = relation_hash.delete('author')