fix karung view data and sync only sync with the current date
This commit is contained in:
1 parent
b3556c6ef4
commit
5ae477a99d
8 files changed
+396
-32
No files matched your search
@@ -27,7 +27,7 @@ from apps.operations.serializers import (
|
||||
KPISerializer,
|
||||
ManualInputSerializer,
|
||||
)
|
||||
from apps.operations.services.karung_web import KarungWebError, request_karung
|
||||
from apps.operations.services.karung_web import KarungWebError, sync_karung_for_cycle
|
||||
from apps.operations.services.visibility import dashboard_publish_time, visible_through_date
|
||||
|
||||
READ_ACTIONS = frozenset({"list", "retrieve", "latest_average", "latest", "dates"})
|
||||
@@ -129,7 +129,7 @@ class FeedSacksViewSet(CycleScopedViewSet):
|
||||
return Response({"detail": "Cycle not found."}, status=status.HTTP_404_NOT_FOUND)
|
||||
section = request.data.get("section") or "today"
|
||||
try:
|
||||
feed_sack, summary = request_karung(cycle, section=section)
|
||||
feed_sack, summary = sync_karung_for_cycle(cycle, section=section)
|
||||
except (KarungWebError, ValidationError) as exc:
|
||||
code = getattr(exc, "status_code", None)
|
||||
return Response(
|
||||
|
||||
Reference in new issue
Block a user