浏览代码

chore: commit pending changes before subtree update

odoo 3 月之前
父节点
当前提交
2100f4a10a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/whatsapp_account.py

+ 2 - 2
models/whatsapp_account.py

@@ -264,7 +264,7 @@ class WhatsAppAccount(models.Model):
             if not group_metadata and value.get("metadata", {}).get("group_id"):
                 group_metadata = {"id": value.get("metadata", {}).get("group_id")}
 
-            if not channel and group_metadata:
+            if group_metadata:
                 # Check if group module is installed (Use 'in' operator for models with dots)
                 if "ww.group" in self.env:
                     # Process Group (Lazy Create + Organic Member Add)
@@ -272,7 +272,7 @@ class WhatsAppAccount(models.Model):
                         self, group_metadata, sender_partner
                     )
 
-                    if group and group.channel_id:
+                    if group and group.channel_id and not channel:
                         channel = group.channel_id
                         _logger.info(
                             "Mensaje de grupo ruteado a canal: %s", channel.name