@@ -685,7 +685,7 @@ def __init__(
685
685
if args :
686
686
element = args [0 ]
687
687
else :
688
- element = kwargs .pop ("element" , Element ( "invalid" ))
688
+ element = kwargs .pop ("element" , EmptyElement ( ))
689
689
690
690
self .target = element .name
691
691
self .element = element
@@ -1016,7 +1016,7 @@ def seq(self):
1016
1016
participants .append (
1017
1017
'database {0} as "{1}"' .format (e ._uniq_name (), e .display_name ())
1018
1018
)
1019
- elif not isinstance (e , Dataflow ) and not isinstance ( e , Boundary ):
1019
+ elif not isinstance (e , ( Dataflow , Boundary , EmptyElement ) ):
1020
1020
participants .append (
1021
1021
'entity {0} as "{1}"' .format (e ._uniq_name (), e .display_name ())
1022
1022
)
@@ -1583,6 +1583,18 @@ def _safeset(self, attr, value):
1583
1583
pass
1584
1584
1585
1585
1586
+ class EmptyElement (Element ):
1587
+ """An empty element to avoid generation of elements for standalone Finding"""
1588
+
1589
+ def __init__ (self ):
1590
+ super ().__init__ ("AutoGenerated" , description = "Autogenerated element for Finding" )
1591
+ # This type is used as a part of manual created Finding
1592
+ # and is not a component of data flows described by users
1593
+ # That why it has not be drawn on diagrams
1594
+ # To do this just mark it as already drawn
1595
+ self ._is_drawn = True # Prevent drawing on diagrams
1596
+
1597
+
1586
1598
class Asset (Element ):
1587
1599
"""An asset with outgoing or incoming dataflows"""
1588
1600
0 commit comments