mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #12062: Avoid caching invalid RSS feed content
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
<div class="list-group list-group-flush">
|
||||
{% for entry in feed.entries %}
|
||||
<div class="list-group-item px-1">
|
||||
<h6><a href="{{ entry.link }}">{{ entry.title }}</a></h6>
|
||||
<div>
|
||||
{{ entry.summary|safe }}
|
||||
{% if not feed.bozo %}
|
||||
<div class="list-group list-group-flush">
|
||||
{% for entry in feed.entries %}
|
||||
<div class="list-group-item px-1">
|
||||
<h6><a href="{{ entry.link }}">{{ entry.title }}</a></h6>
|
||||
<div>
|
||||
{{ entry.summary|safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="list-group-item text-muted">No content found</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% empty %}
|
||||
<div class="list-group-item text-muted">No content found</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{# There was an error retrieving/parsing the feed #}
|
||||
<span class="text-danger">
|
||||
<i class="mdi mdi-alert"></i> There was a problem fetching the RSS feed:
|
||||
</span>
|
||||
<pre class="m-2">
|
||||
Response status: {{ feed.status }}
|
||||
Error: {{ feed.bozo_exception|escape }}</pre>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user