Fix bulk nameserver notification handling

This commit is contained in:
Karl Erik Õunapuu 2020-12-22 16:08:15 +02:00
parent f80c597be8
commit 8f25175cec
No known key found for this signature in database
GPG key ID: C9DD647298A34764
4 changed files with 19 additions and 8 deletions

View file

@ -49,12 +49,13 @@ class Registrar
if response.code == '200'
notices = [t('.replaced')]
notices << "#{t('.affected_domains')}: #{parsed_response[:affected_domains].join(', ')}"
notices << "#{t('.affected_domains')}: " \
"#{parsed_response[:data][:affected_domains].join(', ')}"
flash[:notice] = notices
flash[:notice] = notices.join(', ')
redirect_to registrar_domains_url
else
@api_errors = parsed_response[:errors]
@api_errors = parsed_response[:message]
render file: 'registrar/bulk_change/new', locals: { active_tab: :nameserver }
end
end