Skip to content

Commit

Permalink
fix: Solved various problems
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Lehmann <[email protected]>
  • Loading branch information
ewuerger and Wuestengecko committed Sep 17, 2024
1 parent 395ea3c commit 94d8989
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion templates/cross-cutting/classes.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
{% for val in property.type.literals %}
<tr>
<td>{{ val.name }}</td>
<td>{{ val.value if val.value else "0" }}</td>
{% set value = val.value if val.value else "" %}
<td>{{ value.value if value.value is defined else "0" }}</td>
</tr>
{% endfor %}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions templates/cross-cutting/exchange-item.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
{%- set src = exchange.source.owner.owner if exchange.source.owner.owner else None -%}
{%- set tgt = exchange.target.owner.owner if exchange.target.owner.owner else None -%}
<li>
{{ linked_name_with_icon(exchange) | safe }}
, produced by {{ linked_name_with_icon(exchange.source.owner) | safe }} of {{ linked_name_with_icon(src) | safe if src else "Unassigned" }}
{{ linked_name_with_icon(exchange) | safe }},
produced by {{ linked_name_with_icon(exchange.source.owner) | safe }} of {{ linked_name_with_icon(src) | safe if src else "Unassigned" }}
&nbsp;and consumed by {{ linked_name_with_icon(exchange.target.owner) | safe }} of {{ linked_name_with_icon(tgt) | safe if tgt else "Unassigned" }}</li>
{%- endfor -%}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
{%- if object.owner -%}
{% set partners = partners | rejectattr("uuid", "equalto", object.owner.uuid) | list %}
{%- endif -%}
{%- for partner in partners | unique -%} {{ linked_name_with_icon(partner) | safe }},&nbsp;{%- endfor -%}</p>
{%- for partner in partners | unique(attribute="uuid") -%} {{ linked_name_with_icon(partner) | safe }},&nbsp;{%- endfor -%}</p>



Expand Down
4 changes: 2 additions & 2 deletions templates/operational-analysis/operational-capability.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@

<h2>Involved entities and activities</h2>
To enable the Capability, the following entities and activities are involved:
{%- set entities = object.involved_entities | list + object.involved_activities | map(attribute="owner") | unique | list -%}
{%- set entities = object.involved_entities | list + object.involved_activities | map(attribute="owner") | unique(attribute="uuid") | list -%}
{%- if entities -%}
<ul>
{%- for entity in entities | unique -%}
{%- for entity in entities -%}
{%- set activities = object.involved_activities | selectattr("owner", "equalto", entity) | list -%}
{%- if activities -%}
<li>
Expand Down
2 changes: 1 addition & 1 deletion templates/physical-architecture/sw-interface.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This interface control document defines functional interactions between the foll
{% set _none = items.append(item) %}
{% endfor %}
{% endfor %}
{% for item in items | unique %}
{% for item in items | unique(attribute="uuid") %}
<li>{{ linked_name_with_icon(item) | safe }}</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion templates/system-analysis/system-capability.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<p>This section provides a summary of what functions are required from the
System and the actors to enable the system Capability.</p>

{% set real_entities = object.involved_functions | selectattr("owner") | map(attribute="owner") | unique %}
{% set real_entities = object.involved_functions | selectattr("owner") | map(attribute="owner") | unique(attribute="uuid") %}

{% for entity in real_entities %}
<h3>{{ entity.name }}</h3>
Expand Down
2 changes: 1 addition & 1 deletion templates/system-analysis/system-interface.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{%- endif -%}
{% endfor %}
via <i>{{ interface.name }}</i> interface (component exchange) so that {{ linked_name(target) | safe }} could&nbsp;
{%- for fnc in exchanges | map(attribute='target.owner') | unique -%}
{%- for fnc in exchanges | map(attribute='target.owner') | unique(attribute="uuid") -%}
{{ linked_name(fnc) | safe }}{% if not loop.last %}, {% else %} {% endif %}
{%- endfor -%}
</p>
Expand Down

0 comments on commit 94d8989

Please sign in to comment.