Skip to content

Commit

Permalink
added a force_validation option to API._is_node_schema_valid()
Browse files Browse the repository at this point in the history
  • Loading branch information
nh916 committed Oct 5, 2023
1 parent 1c8acf2 commit e40fc70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cript/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def _get_db_schema(self) -> dict:
return self._db_schema

@beartype
def _is_node_schema_valid(self, node_json: str, is_patch: bool = False) -> bool:
def _is_node_schema_valid(self, node_json: str, is_patch: bool = False, force_validation: bool = False) -> bool:
"""
Checks a node JSON schema against the db schema to return if it is valid or not.
Expand Down Expand Up @@ -637,7 +637,7 @@ def _is_node_schema_valid(self, node_json: str, is_patch: bool = False) -> bool:
"""

# Skip database schema validation if `has_db_schema_validation` is False.
if not self.has_db_schema_validation:
if not self.has_db_schema_validation and not force_validation:
return True

db_schema = self._get_db_schema()
Expand Down

0 comments on commit e40fc70

Please sign in to comment.