Fix empty tag page
parent
ae28cf2294
commit
953a6c3b91
|
@ -685,10 +685,10 @@ async def tag_by_name(
|
||||||
.join(models.TaggedOutboxObject)
|
.join(models.TaggedOutboxObject)
|
||||||
.where(*where)
|
.where(*where)
|
||||||
)
|
)
|
||||||
|
if is_activitypub_requested(request):
|
||||||
if not tagged_count:
|
if not tagged_count:
|
||||||
raise HTTPException(status_code=404)
|
raise HTTPException(status_code=404)
|
||||||
|
|
||||||
if is_activitypub_requested(request):
|
|
||||||
outbox_object_ids = await db_session.execute(
|
outbox_object_ids = await db_session.execute(
|
||||||
select(models.OutboxObject.ap_id)
|
select(models.OutboxObject.ap_id)
|
||||||
.join(
|
.join(
|
||||||
|
@ -736,6 +736,7 @@ async def tag_by_name(
|
||||||
"request": request,
|
"request": request,
|
||||||
"objects": outbox_objects,
|
"objects": outbox_objects,
|
||||||
},
|
},
|
||||||
|
status_code=200 if len(outbox_objects) else 404,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "header.html" %}
|
{% include "header.html" %}
|
||||||
|
|
||||||
|
{% if objects %}
|
||||||
|
|
||||||
<div class="h-feed">
|
<div class="h-feed">
|
||||||
<data class="p-name" value="{{ local_actor.display_name}}'s notes"></data>
|
<data class="p-name" value="{{ local_actor.display_name}}'s notes"></data>
|
||||||
{% for outbox_object in objects %}
|
{% for outbox_object in objects %}
|
||||||
|
@ -43,4 +45,10 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<p>Nothing to see here yet!</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue