Only set default status for Attract nodes.

This commit is contained in:
2016-11-01 10:54:52 +01:00
parent 50ab60daba
commit 57447cb24c

View File

@@ -4,9 +4,15 @@ import logging
import flask
from pillar.api.nodes import only_for_node_type_decorator
from .node_types import NODE_TYPES
log = logging.getLogger(__name__)
attract_nodes_only = only_for_node_type_decorator(*(nt['name'] for nt in NODE_TYPES))
@attract_nodes_only
def set_default_status(node):
"""Sets the default status based on the project node type dynamic schema."""