diff --git a/api/serializers/declaration.py b/api/serializers/declaration.py index 24945017..7b0903c2 100644 --- a/api/serializers/declaration.py +++ b/api/serializers/declaration.py @@ -578,6 +578,8 @@ class Meta: model = Declaration fields = ( "id", + "siccrf_id", + "declared_in_teleicare", "status", "author", "company", diff --git a/data/models/declaration.py b/data/models/declaration.py index 020c1e73..68e8a600 100644 --- a/data/models/declaration.py +++ b/data/models/declaration.py @@ -390,6 +390,10 @@ def response_limit_date(self): def __str__(self): return f"Déclaration « {self.name} »" + @property + def declared_in_teleicare(self): + return self.siccrf_id is not None + @property def computed_substances_with_max_quantity_exceeded(self): substances_with_max_quantity_exceeded = self.computed_substances.exclude(