Problem with upgrade and missing "__PORT__" replace in nginx.conf

The upgrade for GitHub - YunoHost-Apps/pyinventory_ynh: YunoHost app package for: https://github.com/jedie/PyInventory doesn’t work yet.

It ends with:

nginx: [emerg] invalid port in upstream “127.0.0.1:PORT/” in /etc/nginx/conf.d/yunohost.fritz.box.d/pyinventory.conf:33

It seems that “PORT” is not replace by upgrade script…
It’s done by:

port=$(ynh_app_setting_get --app="$app" --key=port)
ynh_add_nginx_config "public_path" "port"

The install script does this:

port=$(ynh_find_port --port=8000)
ynh_app_setting_set --app="$app" --key=port --value="$port"
ynh_add_nginx_config "public_path" "port"

The install part works, but the upgrade part not.
It seems to me that ynh_app_setting_get --app="$app" --key=port returns None so that ynh_add_nginx_config doesn’t replace __PORT__

Any idea?

Do you have the port when you enter yunohost app setting yourapp port ?

Yes, the port is stored…

The Problem is away. Think i fixed it with https://github.com/YunoHost-Apps/pyinventory_ynh/commit/cb94da4684dd8f56850bd9d4f9cd638b267541a4#diff-57aeb84da86cb7420dfedd8e49bc644fb799d5413d01927a0417bde753e8922f