diff --git a/product/ERP5Type/dynamic/component_package.py b/product/ERP5Type/dynamic/component_package.py
index a564b9a88d0be7be89968dfc4f1b235e906a0c98..52644283241fc7cf7f9748fc8d99ea4e7c8d12dc 100644
--- a/product/ERP5Type/dynamic/component_package.py
+++ b/product/ERP5Type/dynamic/component_package.py
@@ -212,8 +212,7 @@ class ComponentDynamicPackage(ModuleType):
         component = component_version_dict.get(version, None)
         if component is not None:
           break
-
-      if component is None:
+      else:
         return None
 
       try: