(current_version)
If the container was recreated and it's not a minor/major upgrade,
    we need to fix the media/avatars and media/custom symlink.
If the container was recreated and it's not a minor/major upgrade,
    we need to fix the media/avatars and media/custom symlink.
If the container was recreated and it s not a minor / major upgrade we need to fix the media / avatars and media / custom symlink .
def fix_media_symlinks(current_version):
    """
    If the container was recreated and it's not a minor/major upgrade,
    we need to fix the media/avatars and media/custom symlink.
    """
    media_dir = join(
        installdir,
        'seafile-server-{}/seahub/media'.format(current_version)
    )
    avatars_dir = join(media_dir, 'avatars')
    if not islink(avatars_dir):
        logger.info('The container was recreated, running minor-upgrade.sh to fix the media symlinks')
        run_minor_upgrade(current_version)
def fix_media_symlinks ( current_version ) : media_dir = join ( installdir , 'seafile-server-{}/seahub/media' . format ( current_version ) ) avatars_dir = join ( media_dir , 'avatars' ) if not islink ( avatars_dir ) : logger . info ( 'The container was recreated, running minor-upgrade.sh to fix the media symlinks' ) run_minor_upgrade ( current_version )