fix(fulfillment): reconcile stale pending roles from newer observations
This commit is contained in:
@@ -19,7 +19,10 @@ from ..models import (
|
||||
)
|
||||
from .account_events_service import EVENT_COLLAB_SYNCED
|
||||
from .audit_service import record_account_action, record_audit
|
||||
from .douyu_binding import BINDING_VIEW_CONFIRMED, resolve_douyu_binding
|
||||
from .douyu_binding import (
|
||||
BINDING_VIEW_CONFIRMED,
|
||||
resolve_fulfillment_binding,
|
||||
)
|
||||
from .douyu_collab_common import (
|
||||
POINTS_THRESHOLD_DEFAULT,
|
||||
SOURCE_TYPE_PLATFORM_FULFILLMENT,
|
||||
@@ -103,9 +106,10 @@ def _apply_platform_fulfillment_binding(
|
||||
)
|
||||
if bind_task is None:
|
||||
return
|
||||
binding = resolve_douyu_binding(
|
||||
binding = resolve_fulfillment_binding(
|
||||
bind_task,
|
||||
account=db.get(Account, int(task.account_id)) if task.account_id else None,
|
||||
binding_status=task.binding_status,
|
||||
)
|
||||
if binding.status != BINDING_VIEW_CONFIRMED:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user