Closed elfman2 closed 1 month ago
Hi @elfman2, thanks for reporting this.
I tried to reproduce this issue and couldn't. Here's an integration test that I created based on your input and it is passing for me: https://github.com/strictdoc-project/strictdoc/compare/stanislaw/custom_grammar_link?expand=1.
Apparently, there is some other detail in your setup that leads to an error. Could you share which other details I should add to my itest?
Hi Stanislav, now if you try to add a new link with the web UI: element: GrammarElement = grammar.elements_by_type["REQUIREMENT"] KeyError: 'REQUIREMENT' Nicolas
And if you add REQUIREMENT to the grammar, and you use the UI to add a new link target_requirement.document.grammar.elements_by_type[ KeyError: 'RULE'
@elfman2
pip install strictdoc --pre
The issue should be fixed now.
From what I know so far, the custom nodes editing and linking using UI hasn't received enough testing. Please let us know if you encounter any further issues.
version 0.0.58 Cannot link doc A / RULE to parent B / OBJECTIVE
if grammar for REQUIREMENT is not present: => KeyError: 'REQUIREMENT' else: => KeyError: 'RULE'
Custom grammar for doc A:
Custom grammar for doc B: