fix pending actions showing agent pending update even though it was already updated
This commit is contained in:
parent
c89349a43a
commit
4b069cc2b0
|
@ -83,7 +83,7 @@ def handle_resolved_stuff() -> None:
|
|||
for agent in agent_queryset.annotate(
|
||||
has_pending_actions=Exists(
|
||||
PendingAction.objects.filter(
|
||||
pk=OuterRef("pk"), action_type="agent_update", status="pending"
|
||||
agent=OuterRef("pk"), action_type="agentupdate", status="pending"
|
||||
)
|
||||
)
|
||||
):
|
||||
|
@ -97,7 +97,7 @@ def handle_resolved_stuff() -> None:
|
|||
and agent.has_pending_actions
|
||||
):
|
||||
agent.pendingactions.filter(
|
||||
action_type="agent_update", status="pending"
|
||||
action_type="agentupdate", status="pending"
|
||||
).update(status="completed")
|
||||
|
||||
# sync scheduled tasks
|
||||
|
|
Loading…
Reference in New Issue