forked from erp-dev/erp
fix: appversions
This commit is contained in:
@@ -16,9 +16,9 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _build_unreplied_mission_payload(*, mission: mission_models.Mission, notified_at) -> dict[str, Any]:
|
||||
participant_names = list(
|
||||
mission.get_participants().values_list("employee__name", flat=True)
|
||||
)
|
||||
participants = list(mission.get_participants().values_list("employee_id", "employee__name"))
|
||||
participant_ids = [employee_id for employee_id, _ in participants]
|
||||
participant_names = [employee_name for _, employee_name in participants]
|
||||
content_type = getattr(mission.content_type, "model", None)
|
||||
next_count = mission.unreplied_notify_sent_count + 1
|
||||
payload = {
|
||||
@@ -32,6 +32,7 @@ def _build_unreplied_mission_payload(*, mission: mission_models.Mission, notifie
|
||||
"is_cancelled": mission.is_cancelled,
|
||||
"creator_id": mission.creator_id,
|
||||
"creator_name": getattr(mission.creator, "name", ""),
|
||||
"participant_ids": participant_ids,
|
||||
"participant_names": participant_names,
|
||||
"participant_names_display": "、".join(participant_names) if participant_names else "无",
|
||||
"content_type": content_type or "",
|
||||
|
||||
Reference in New Issue
Block a user