Skip to content

Commit

Permalink
fix problem with vvt edit view
Browse files Browse the repository at this point in the history
  • Loading branch information
KaydenLiss committed Jul 31, 2023
1 parent 859bbff commit d9a47da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Controller/VvtController.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ public function editVvt(
}
$newVvt = $VVTService->cloneVvt($vvt, $this->getUser());

foreach ($vvt->getKategorien() as $cloneKat) {//hier haben wir die geklonten KAtegorien
$newVvt->addKategorien($VVTDatenkategorieService->findLatestKategorie($cloneKat->getCloneOf()));//wir hängen die neueste gültige Datenkategorie an den VVT clone an.
foreach ($vvt->getKategorien() as $category) {//hier haben wir die geklonten Kategorien
$cloneOf = $category->getCloneOf() ?: $category; //wir hängen die neueste gültige Datenkategorie an den VVT clone an.
$newVvt->addKategorien($VVTDatenkategorieService->findLatestKategorie($cloneOf));
}

$isEditable = $vvt->getTeam() === $team;
Expand Down
2 changes: 1 addition & 1 deletion templates/vvt/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
title="{% trans %}dataProtectionImpactAssessment.create{% endtrans %}">
<span>{% trans %}dsfa.create{% endtrans %}</span>
</a>
{% else %}
{% elseif vvt.activDsfa is not null %}
<a class="btn btn-indigo ml-1 btn-sm " href="{{ path('vvt_dsfa_edit', {'dsfa':vvt.activDsfa.id}) }}"
title="{% trans %}dataProtectionImpactAssessment.show{% endtrans %}">
<span>{% trans %}dsfa.show{% endtrans %}</span>
Expand Down

0 comments on commit d9a47da

Please sign in to comment.