From 7ed7c0db82f2903e974508694b62b9b972089259 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Wed, 20 Jan 2021 13:46:28 +0900 Subject: [PATCH] CMFActivity.Activity.SQLQueue: Simplify _hasDependency. --- product/CMFActivity/Activity/SQLBase.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/product/CMFActivity/Activity/SQLBase.py b/product/CMFActivity/Activity/SQLBase.py index be37e9a760..fedffe5f6f 100644 --- a/product/CMFActivity/Activity/SQLBase.py +++ b/product/CMFActivity/Activity/SQLBase.py @@ -260,15 +260,11 @@ CREATE TABLE %s ( " message) VALUES\n(%s)") _insert_separator = "),\n(" - def _hasDependency( - self, - message, - _DEPENDENCY_NAME_SET=frozenset(_DEPENDENCY_TESTER_DICT), - ): + def _hasDependency(self, message): get = message.activity_kw.get return any( get(x) is not None - for x in _DEPENDENCY_NAME_SET + for x in _DEPENDENCY_TESTER_DICT ) def prepareQueueMessageList(self, activity_tool, message_list): -- 2.30.9