Prevent immediate scan count repolling

This commit is contained in:
Joren de Graaf
2026-10-26 20:23:16 +01:00
parent 129ceec408
commit e6a51e1964
2 changed files with 2 additions and 2 deletions
@@ -1,6 +1,6 @@
<div class="inventory-staging-counts" id="inventory-staging-counts"
hx-get="{% url 'food:inventory-staging-counts' %}"
hx-trigger="load, every 5s" hx-swap="outerHTML"
hx-trigger="every 5s" hx-swap="outerHTML"
aria-live="polite" aria-atomic="true">
<a href="{% url 'food:inventory-review' %}?state=processing"><strong>{{ processing_count }}</strong><span>Processing</span></a>
<a href="{% url 'food:inventory-review' %}"><strong>{{ needs_review_count }}</strong><span>Needs Review</span></a>
+1 -1
View File
@@ -43,7 +43,7 @@ class FoodFoundationTests(TestCase):
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<strong>1</strong>', html=True)
self.assertContains(response, '<strong>1</strong>', html=True)
self.assertContains(response, 'hx-trigger="load, every 5s"')
self.assertContains(response, 'hx-trigger="every 5s"')
InventoryScanItem.objects.filter(batch=batch, barcode='111').update(status=InventoryScanItem.Status.COMPLETE)
response = self.client.get(url, secure=True)