Skip to content

Commit 72907c6

Browse files
committed
added IsTemplate column
1 parent fcd6e7a commit 72907c6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

synapseclient/extensions/curator/schema_generation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,6 @@ def __init__(self, graph: MULTI_GRAPH_TYPE, logger: Logger, output_path: str = "
21022102

21032103
class_template = ClassTemplate()
21042104
self.class_template = json.loads(class_template.to_json())
2105-
self.logger = logger
21062105

21072106
def get_edges_associated_with_node(
21082107
self, node: str
@@ -2333,15 +2332,15 @@ def add_contexts_to_entries(self, template: dict) -> dict:
23332332
if rel_key:
23342333
rel_key = rel_key[0]
23352334
# If the current relationship can be defined with a 'node_attr_dict'
2336-
if "node_attr_dict" in self.rel_dict[rel_key].keys():
2335+
if "node_attr_dict" in self.rel_dict[rel_key]:
23372336
try:
23382337
# if possible pull standard function to get node information
23392338
rel_func = self.rel_dict[rel_key]["node_attr_dict"]["standard"]
23402339
except Exception: # pylint:disable=bare-except
23412340
# if not pull default function to get node information
23422341
rel_func = self.rel_dict[rel_key]["node_attr_dict"]["default"]
23432342

2344-
# Add appropritae contexts that have been removed in previous steps
2343+
# Add appropriate contexts that have been removed in previous steps
23452344
# (for JSONLD) or did not exist to begin with (csv)
23462345
if (
23472346
rel_key == "id"
@@ -2350,7 +2349,7 @@ def add_contexts_to_entries(self, template: dict) -> dict:
23502349
):
23512350
template[jsonld_key] = "bts:" + template[jsonld_key]
23522351
elif (
2353-
rel_key in ["required", "IsTemplate"]
2352+
self.rel_dict[rel_key].get("type") == bool
23542353
and rel_func == convert_bool_to_str
23552354
and "sms" not in str(template[jsonld_key]).lower()
23562355
):

0 commit comments

Comments
 (0)