Only set default status for Attract nodes.
This commit is contained in:
@@ -4,9 +4,15 @@ import logging
|
|||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
|
||||||
|
from pillar.api.nodes import only_for_node_type_decorator
|
||||||
|
from .node_types import NODE_TYPES
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
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):
|
def set_default_status(node):
|
||||||
"""Sets the default status based on the project node type dynamic schema."""
|
"""Sets the default status based on the project node type dynamic schema."""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user