Skip to content

Commit

Permalink
add property declared_in_teleicare
Browse files Browse the repository at this point in the history
  • Loading branch information
Perrine Letellier committed Jan 9, 2025
1 parent 211b44c commit d7184d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/serializers/declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ class Meta:
model = Declaration
fields = (
"id",
"siccrf_id",
"declared_in_teleicare",
"status",
"author",
"company",
Expand Down
4 changes: 4 additions & 0 deletions data/models/declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d7184d6

Please sign in to comment.