From b21cac55f467d62b6492a70271d30ae612e3bcda Mon Sep 17 00:00:00 2001 From: woni <320753691@qq.com> Date: Thu, 6 Jun 2024 16:48:45 +0800 Subject: [PATCH] add some features --- app/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 4fc6665..80c0f6c 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -130,11 +130,10 @@ def do_bitable_record_add(data) -> None: if field.get("field_id") == "fldaxMbywh": # 有可能值为空 - - print(field) - # action_data["deal_person"] = ( - # field.get("field_identity_value").get("users")[0].get("name") - # ) + if not field.get("field_value"): + action_data["deal_person"] = ( + field.get("field_identity_value").get("users")[0].get("name") + ) print(f"table_id: {table_id}") print(f"record_id: {record_id}") @@ -146,7 +145,7 @@ def do_bitable_record_add(data) -> None: process_new_demand.delay(app_id, app_secret, table_id, record_id, action_data) return - if "record_edited" in actions_name and action_data["status"] == "xxxxxxx": + if "record_edited" in actions_name and action_data["status"] == "optgKzdQp5": process_new_robot.delay() return