From f727123ab3029328f06ca54d1432accb9db476af Mon Sep 17 00:00:00 2001 From: Luke Swanson Date: Wed, 30 Oct 2024 23:15:49 -0500 Subject: [PATCH] Some changes missed when switching FromDict to use cls. --- src/ogd/common/schemas/tables/ColumnSchema.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ogd/common/schemas/tables/ColumnSchema.py b/src/ogd/common/schemas/tables/ColumnSchema.py index 56e9be6..a8f93ec 100644 --- a/src/ogd/common/schemas/tables/ColumnSchema.py +++ b/src/ogd/common/schemas/tables/ColumnSchema.py @@ -67,24 +67,24 @@ def FromDict(cls, name:str, all_elements:Dict[str, Any], logger:Optional[logging else: Logger.Log(_msg, logging.WARN) - _readable = ColumnSchema.ElementFromDict(all_elements=all_elements, logger=logger, + _readable = cls.ElementFromDict(all_elements=all_elements, logger=logger, element_names=["readable"], - parser_function=ColumnSchema._parseReadable, + parser_function=cls._parseReadable, default_value=name ) - _description = ColumnSchema.ElementFromDict(all_elements=all_elements, logger=logger, + _description = cls.ElementFromDict(all_elements=all_elements, logger=logger, element_names=["description"], - parser_function=ColumnSchema._parseDescription, + parser_function=cls._parseDescription, default_value="NO DESCRIPTION GIVEN" ) - _value_type = ColumnSchema.ElementFromDict(all_elements=all_elements, logger=logger, + _value_type = cls.ElementFromDict(all_elements=all_elements, logger=logger, element_names=["type"], - parser_function=ColumnSchema._parseValueType, + parser_function=cls._parseValueType, default_value="TYPE NOT GIVEN" ) - _name = ColumnSchema.ElementFromDict(all_elements=all_elements, logger=logger, + _name = cls.ElementFromDict(all_elements=all_elements, logger=logger, element_names=["name"], - parser_function=ColumnSchema._parseName, + parser_function=cls._parseName, default_value=name ) _used = {"name", "readable", "description", "type"}