瀏覽代碼

chore: fix typo

takatost 5 月之前
父節點
當前提交
bc0724b499
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      api/events/event_handlers/deduct_quota_when_message_created.py

+ 3 - 0
api/events/event_handlers/deduct_quota_when_message_created.py

@@ -22,6 +22,9 @@ def handle(sender, **kwargs):
 
     system_configuration = provider_configuration.system_configuration
 
+    if not system_configuration.current_quota_type:
+        return
+
     quota_unit = None
     for quota_configuration in system_configuration.quota_configurations:
         if quota_configuration.quota_type == system_configuration.current_quota_type: