[CORD-2810] Only synchronizers can write feedback state
Change-Id: Ia3f28763a0212a570186e4c6c5cb118c40325b5b
diff --git a/lib/xos-genx/xosgenx/targets/django.xtarget b/lib/xos-genx/xosgenx/targets/django.xtarget
index 8ef8e5f..13d37f9 100644
--- a/lib/xos-genx/xosgenx/targets/django.xtarget
+++ b/lib/xos-genx/xosgenx/targets/django.xtarget
@@ -44,6 +44,11 @@
class {{ m.name }}{{ legacy_tag }}{{ xproto_base_def(m.name, m.bases) }}:
plural_name = "{{ xproto_pluralize(m) }}"
+ {%- set feedback_state_fields = xproto_optioned_fields_to_list(xproto_base_fields(m, proto.message_table) + m.fields, 'feedback_state', 'True') %}
+ {%- if feedback_state_fields|length > 0 %}
+ feedback_state_fields = {{ feedback_state_fields }}
+ {%- endif %}
+
{# {% if m.options.no_sync or m.options.no_policy %}#}
{# {% if m.options.no_sync -%}#}
{# # Removing synchronizer feedback state from model#}