diff --git a/app/__init__.py b/app/__init__.py index e165381..e1879cc 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -57,6 +57,10 @@ def create_app(): if cdclient is not None: cdclient.close() + @app.template_filter('debug') + def debug(text): + print(text) + # add the commands to flask cli app.cli.add_command(init_db) app.cli.add_command(init_accounts) diff --git a/app/characters.py b/app/characters.py index 8c5b6aa..f6d53a9 100644 --- a/app/characters.py +++ b/app/characters.py @@ -89,6 +89,7 @@ def view(id): @character_blueprint.route('/view_xml/', methods=['GET']) @login_required +@gm_level(9) def view_xml(id): character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first() @@ -107,6 +108,7 @@ def view_xml(id): @character_blueprint.route('/get_xml/', methods=['GET']) @login_required +@gm_level(9) def get_xml(id): character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first() diff --git a/app/luclient.py b/app/luclient.py index 4f6415a..cb4f0fc 100644 --- a/app/luclient.py +++ b/app/luclient.py @@ -271,6 +271,8 @@ def register_luclient_jinja_helpers(app): )[0] if desc in ("", None): desc = None + if desc: + desc = desc.strip('"') return desc @app.template_filter('get_item_set') diff --git a/app/templates/partials/charxml/_stats.html.j2 b/app/templates/partials/charxml/_stats.html.j2 index 4ff2846..e8bc582 100644 --- a/app/templates/partials/charxml/_stats.html.j2 +++ b/app/templates/partials/charxml/_stats.html.j2 @@ -27,10 +27,12 @@ {% set skill_desc = skill[0]|get_skill_desc %} {% if "IP" not in skill_desc and "AP" not in skill_desc and "LP" not in skill_desc and skill[0]|string not in skill_desc %}
- Skill: + {% if skill[1]%} + Skill: + {% endif %} {{ skill[0]|get_skill_desc }}
{% endif %}