def get_appeals(self, obj): fields = ['id', 'status'] return get_merged_items_by_fields(obj.appeals.all(), fields)
def get_countries(self, obj): fields = ['id', 'name', 'iso', 'iso3', 'society_name'] return get_merged_items_by_fields(obj.countries.all(), fields)
def get_field_reports(self, obj): fields = ['id'] return get_merged_items_by_fields(obj.field_reports.all(), fields)
def get_appeals(self, obj): return get_merged_items_by_fields(obj.appeals.all(), ['id'])
def get_countries(self, obj): return get_merged_items_by_fields(obj.countries.all(), ['id', 'name'])
def get_regions(self, obj): return get_merged_items_by_fields(obj.regions.all(), ['id', 'region_name'])
def get_districts(self, obj): return get_merged_items_by_fields(obj.districts.all(), ['id', 'name'])
def get_project_districts_detail(self, obj): return get_merged_items_by_fields( obj.project_districts.all(), ['name', 'code', 'id', 'is_enclave', 'is_deprecated'])