forked from enviPath/enviPy
wip
This commit is contained in:
@@ -2456,6 +2456,20 @@ class Node(EnviPathModel, AliasMixin, ScenarioMixin, AdditionalInformationMixin)
|
||||
else:
|
||||
return self.default_node_label.name
|
||||
|
||||
def get_description(self, include_suffix=True):
|
||||
default_desc = False
|
||||
|
||||
if self.description == "no description":
|
||||
default_desc = True
|
||||
|
||||
if not default_desc:
|
||||
return self.description
|
||||
else:
|
||||
if include_suffix:
|
||||
return f"{self.default_node_label.description} (taken from underlying structure)"
|
||||
else:
|
||||
return self.default_node_label.description
|
||||
|
||||
def d3_json(self):
|
||||
app_domain_data = self.get_app_domain_assessment_data()
|
||||
|
||||
@@ -2773,6 +2787,20 @@ class Edge(EnviPathModel, AliasMixin, ScenarioMixin, AdditionalInformationMixin)
|
||||
else:
|
||||
return self.edge_label.name
|
||||
|
||||
def get_description(self, include_suffix=True):
|
||||
default_desc = False
|
||||
|
||||
if self.description == "no description":
|
||||
default_desc = True
|
||||
|
||||
if not default_desc:
|
||||
return self.description
|
||||
else:
|
||||
if include_suffix:
|
||||
return f"{self.edge_label.description} (taken from underlying reaction)"
|
||||
else:
|
||||
return self.edge_label.description
|
||||
|
||||
|
||||
class EPModel(PolymorphicModel, EnviPathModel, AdditionalInformationMixin):
|
||||
package = models.ForeignKey(
|
||||
|
||||
Reference in New Issue
Block a user