From 70a0cdbdab75ad55e57ee8af1b4188f8a5271ff3 Mon Sep 17 00:00:00 2001 From: Diego Steiner Date: Thu, 21 Sep 2023 14:44:45 +0200 Subject: [PATCH] keep deprecated correspondence_language for compatibility --- app/serializers/pbs/mailing_list_subscriber_serializer.rb | 3 ++- app/serializers/pbs/person_serializer.rb | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/serializers/pbs/mailing_list_subscriber_serializer.rb b/app/serializers/pbs/mailing_list_subscriber_serializer.rb index a4575e9cf..2dec3f028 100644 --- a/app/serializers/pbs/mailing_list_subscriber_serializer.rb +++ b/app/serializers/pbs/mailing_list_subscriber_serializer.rb @@ -10,8 +10,9 @@ module Pbs::MailingListSubscriberSerializer included do schema do - # TBD: keep this fields name? + # correspondence_language is deprecated and could be removed in the future property :correspondence_language, item.language + property :language, item.language property :kantonalverband_short_name, item.kantonalverband.short_name end end diff --git a/app/serializers/pbs/person_serializer.rb b/app/serializers/pbs/person_serializer.rb index e55c9c109..d77f703fe 100644 --- a/app/serializers/pbs/person_serializer.rb +++ b/app/serializers/pbs/person_serializer.rb @@ -10,10 +10,12 @@ module Pbs::PersonSerializer included do extension(:details) do |_| - # TBD: keep fields name? map_properties :pbs_number, :salutation_value, :language, :prefers_digital_correspondence, :grade_of_school, :brother_and_sisters, :entry_date, :leaving_date + + # correspondence_language is deprecated and could be removed in the future + property :correspondence_language, item.language end end