Skip to content

Commit

Permalink
Merge pull request #2709 from PnX-SI/fix/occtax_mobile_absolute_apk_url
Browse files Browse the repository at this point in the history
fix occtax mobile absolute apk_url ref #2708
  • Loading branch information
camillemonchicourt authored Sep 20, 2023
2 parents ce047ed + b87523b commit e16f0be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/geonature/core/gn_commons/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ def get_t_mobile_apps():
if app.relative_path_apk:
relative_apk_path = Path("mobile", app.relative_path_apk)
app_dict["url_apk"] = url_for("media", filename=str(relative_apk_path), _external=True)
relative_settings_path = relative_apk_path.parent / "settings.json"
app_dict["url_settings"] = url_for(
"media", filename=relative_settings_path, _external=True
)
settings_file = Path(current_app.config["MEDIA_FOLDER"]) / relative_settings_path
with settings_file.open() as f:
app_dict["settings"] = json.load(f)
relative_settings_path = Path(f"mobile/{app.app_code.lower()}/settings.json")
app_dict["url_settings"] = url_for(
"media", filename=relative_settings_path, _external=True
)
settings_file = Path(current_app.config["MEDIA_FOLDER"]) / relative_settings_path
with settings_file.open() as f:
app_dict["settings"] = json.load(f)
mobile_apps.append(app_dict)
if len(mobile_apps) == 1:
return mobile_apps[0]
Expand Down

0 comments on commit e16f0be

Please sign in to comment.