Skip to content

Commit

Permalink
fix: [website] Check if the key 'description' is present in the JSON …
Browse files Browse the repository at this point in the history
…data for vulnerabilities from gsd.
  • Loading branch information
cedricbonhomme committed Jun 25, 2024
1 parent 221a353 commit 09ae367
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions website/web/templates/vulnerability_templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,13 @@ <h6 class="card-subtitle mb-2 text-body-secondary">
{% set languages = ['eng'] %}
{% for namespace in namespaces %}
{% if vulnerability_data['namespaces'].get(namespace, false) %}
{% for item in vulnerability_data['namespaces'][namespace]['description']['description_data'] %}
{% if item['lang'] in languages %}
{{ item['value'] }}
{% endif %}
{% endfor %}
{% if 'description' in vulnerability_data['namespaces'][namespace] %}
{% for item in vulnerability_data['namespaces'][namespace]['description']['description_data'] %}
{% if item['lang'] in languages %}
{{ item['value'] }}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit 09ae367

Please sign in to comment.