@dev_required
@submit_step(7)
def submit_done(request, addon_id, addon, step):
    # Bounce to the versions page if they don't have any versions.
    if not addon.versions.exists():
        return redirect(addon.get_dev_url('versions'))
    sp = addon.current_version.supported_platforms
    is_platform_specific = sp != [amo.PLATFORM_ALL]

    try:
        author = addon.authors.all()[0]
    except __HOLE__:
        # This should never happen.
        author = None

    if author:
        submitted_addons = (author.addons
                            .exclude(status=amo.STATUS_NULL).count())
        if submitted_addons == 1:
            # We can use locale-prefixed URLs because the submitter probably
            # speaks the same language by the time he/she reads the email.
            context = {
                'app': unicode(request.APP.pretty),
                'detail_url': absolutify(addon.get_url_path()),
                'version_url': absolutify(addon.get_dev_url('versions')),
                'edit_url': absolutify(addon.get_dev_url('edit')),
                'full_review': addon.status == amo.STATUS_NOMINATED
            }
            tasks.send_welcome_email.delay(addon.id, [author.email], context)

    return render(request, 'devhub/addons/submit/done.html',
                  {'addon': addon, 'step': step,
                   'is_platform_specific': is_platform_specific})
dataset/ETHPy150Open mozilla/addons-server/src/olympia/devhub/views.py/submit_done