Closes https://github.com/gitlabhq/gitlabhq/issues/6745
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>