update all page to refresh immidiately without clicking sync button or refreshing the whole page

This commit is contained in:
Alberto-Audrix committed 2026-10-07 11:17:44 +07:00
1 parent d5b0c12c40
commit 83a41fbbcb
15 files changed
+490 -151

No files matched your search

@@ -255,6 +255,11 @@ def sync_chicken_counting_for_cycle(
obj.save(update_fields=update_fields)
upserted.append(day)
if upserted:
from apps.operations.services.kpi_rollups import refresh_kpi_source_fields
refresh_kpi_source_fields(cycle)
return {"dates": upserted, "upserted": len(upserted), "skipped": False}
@@ -329,4 +334,9 @@ def sync_chicken_weight_for_cycle(
upserted.append(day)
prev_weight = average_weight
if upserted:
from apps.operations.services.kpi_rollups import refresh_kpi_source_fields
refresh_kpi_source_fields(cycle)
return {"dates": upserted, "upserted": len(upserted), "skipped": False}