Skip to content

Commit

Permalink
Merge pull request #3289 from betagouv/satellite_appro_bug
Browse files Browse the repository at this point in the history
Bug fix : synthèses satellite
  • Loading branch information
hfroot authored Dec 8, 2023
2 parents ae5b256 + 7595e0d commit 4c3e8a3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions api/serializers/diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@
"id",
"canteen_id",
"year",
"diagnostic_type",
"central_kitchen_diagnostic_mode",
)

CREATION_META_FIELDS = (
"creation_date",
"modification_date",
"creation_source",
"diagnostic_type",
"central_kitchen_diagnostic_mode",
)

TUNNEL_PROGRESS_FIELDS = (
Expand Down Expand Up @@ -280,6 +283,7 @@ class Meta:
"creation_mtm_campaign",
"creation_mtm_medium",
)
+ CREATION_META_FIELDS
+ TUNNEL_PROGRESS_FIELDS
)

Expand Down Expand Up @@ -319,7 +323,7 @@ class FullDiagnosticSerializer(serializers.ModelSerializer):

class Meta:
model = Diagnostic
fields = FIELDS + ("teledeclaration",) + TUNNEL_PROGRESS_FIELDS
fields = FIELDS + ("teledeclaration",) + CREATION_META_FIELDS + TUNNEL_PROGRESS_FIELDS
read_only_fields = fields


Expand Down

0 comments on commit 4c3e8a3

Please sign in to comment.