From 95d6eaabb6aa8117fc6083ce188eac1b69727c48 Mon Sep 17 00:00:00 2001 From: Alexander Watzinger Date: Tue, 9 May 2023 14:59:42 +0200 Subject: [PATCH] Fix for #2014: Former network URL isn't working anymore --- config/default.py | 2 +- install/upgrade/upgrade.md | 3 +++ openatlas/views/changelog.py | 2 ++ openatlas/views/model.py | 10 +++++++--- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/config/default.py b/config/default.py index 05cf6e2a2..f3fec4560 100644 --- a/config/default.py +++ b/config/default.py @@ -3,7 +3,7 @@ from config.database_versions import DATABASE_VERSIONS -VERSION = '7.13.0' +VERSION = '7.13.1' DATABASE_VERSION = DATABASE_VERSIONS[0] DEMO_MODE = False # If activated some options are disabled, login is prefilled diff --git a/install/upgrade/upgrade.md b/install/upgrade/upgrade.md index 71ac5fce8..b0c5a2786 100644 --- a/install/upgrade/upgrade.md +++ b/install/upgrade/upgrade.md @@ -19,6 +19,9 @@ base, then run the database upgrade script, then restart Apache: sudo python3 install/upgrade/database_upgrade.py sudo service apache2 restart +### 7.13.0 to 7.13.1 +A code base update (e.g. with git pull) and a webserver restart is sufficient. + ### 7.12.0 to 7.13.0 7.13.0.sql is needed but will be taken care of by the database upgrade script. diff --git a/openatlas/views/changelog.py b/openatlas/views/changelog.py index c90f07040..119f119be 100644 --- a/openatlas/views/changelog.py +++ b/openatlas/views/changelog.py @@ -15,6 +15,8 @@ def index_changelog() -> str: versions = { + '7.13.1': ['2023-05-09', { + 'fix': {'2014': "Former network URL isn't working anymore"}}], '7.13.0': ['2023-05-06', { 'feature': { '1952': 'E11 Modification', diff --git a/openatlas/views/model.py b/openatlas/views/model.py index ad4346205..d5cf58047 100644 --- a/openatlas/views/model.py +++ b/openatlas/views/model.py @@ -269,9 +269,13 @@ class NetworkForm(FlaskForm): widget=widgets.ListWidget(prefix_label=False)) -@app.route('/network/', methods=["GET", "POST"]) -@app.route('/network//', methods=["GET", "POST"]) -def network(dimensions: int, id_: Optional[int] = None) -> str: +@app.route('/overview/network/', methods=["GET", "POST"]) +@app.route('/overview/network/', methods=["GET", "POST"]) +@app.route( + '/overview/network//', + methods=["GET", "POST"]) +@required_group('readonly') +def network(dimensions: Optional[int] = 0, id_: Optional[int] = None) -> str: entity = Entity.get_by_id(id_) if id_ else None classes = [c for c in g.classes.values() if c.network_color] for class_ in classes: