Skip to content

Commit c536497

Browse files
authored
Merge pull request strictdoc-project#1455 from strictdoc-project/stanislaw/query
query_object: whitelist "UID", "STATUS", "RATIONALE" for now
2 parents b3aebed + c8bd443 commit c536497

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

strictdoc/core/query_engine/query_object.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ def _evaluate_node_field_expression(
196196
)
197197
grammar_field_titles = list(map(lambda f: f.title, element.fields))
198198
if field_name not in grammar_field_titles:
199+
# These fields are used on the statistics screen but a user
200+
# may have them disabled in the grammar.
201+
if field_name in ("UID", "STATUS", "RATIONALE"):
202+
return None
199203
raise AttributeError(f"No such requirement field: {field_name}")
200204
field_value = requirement._get_cached_field(field_name, False)
201205
if field_value is not None:

0 commit comments

Comments
 (0)