Skip to content

Commit

Permalink
Merge branch 'CA-672-Step-1.1-1.2' of github.com:intuitem/ciso-assist…
Browse files Browse the repository at this point in the history
…ant-community into CA-672-Step-1.1-1.2
  • Loading branch information
Mohamed-Hacene committed Dec 3, 2024
2 parents e0b1521 + 334bf99 commit 6d733ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/ebios_rm/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from core.models import StoredLibrary, RiskMatrix
from .models import EbiosRMStudy
from rest_framework import serializers
import logging


class EbiosRMStudyWriteSerializer(BaseModelSerializer):
Expand All @@ -21,7 +22,8 @@ def create(self, validated_data):
urn="urn:intuitem:risk:matrix:risk-matrix-4x4-ebios-rm"
)
except (StoredLibrary.DoesNotExist, RiskMatrix.DoesNotExist) as e:
raise serializers.ValidationError(f"Erreur : {str(e)}")
logging.error(f"Error loading risk matrix: {str(e)}")
raise serializers.ValidationError("An error occurred while loading the risk matrix.")
return super().create(validated_data)

class Meta:
Expand Down

0 comments on commit 6d733ab

Please sign in to comment.