Commit 43bb1933 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Component accessors required to fill registry dict may have not be generated.

For now, just ignore it but it may be required later to define dummy accessors
so that the registry and Components can be loaded even when their accessors
are not generated yet.
parent d111df6e
...@@ -111,7 +111,13 @@ class ComponentDynamicPackage(ModuleType): ...@@ -111,7 +111,13 @@ class ComponentDynamicPackage(ModuleType):
# Only consider modified or validated states as state transition will # Only consider modified or validated states as state transition will
# be handled by component_validation_workflow which will take care of # be handled by component_validation_workflow which will take care of
# updating the registry # updating the registry
if component.getValidationState() in ('modified', 'validated'): try:
validation_state_tuple = component.getValidationState()
except AttributeError:
# XXX: Accessors may have not been generated yet
pass
else:
if validation_state_tuple in ('modified', 'validated'):
version = component.getVersion(validated_only=True) version = component.getVersion(validated_only=True)
# The versions should have always been set on ERP5Site property # The versions should have always been set on ERP5Site property
# beforehand # beforehand
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment