# Path: mtr/sync/lib/manager.py
# class Manager(BaseManager):
#     def convert_value(self, value, field, export=False, action=None):
#     def processor_choices(self):
#     def dataset_choices(self):
#     def action_choices(self):
#     def converter_choices(self):
#     def make_processor(self, settings, from_extension=False):
#     def export_data(self, settings, data=None):
#     def export_data_inline(self, **settings):
#     def import_data_inline(self, **settings):
#     def filter_dataset(self, settings, dataset=None):
#     def prepare_export_dataset(self, settings):
#     def prepare_export_data(self, processor, queryset):
#     def prepare_handlers(self, key_name, processor, model, context=None):
#     def prepare_context(self, settings, path):
#     def prepare_import_data(self, processor, model):
#     def import_data(self, settings, path=None):
#     def prepare_import_dataset(self, settings, processor, model, fields):
#     def model_data(self, settings, processor, model, fields):
# 
# Path: mtr/sync/translation.py



from django.db import models
from .manager import manager
from ..translation import gettext_lazy as _
from mtr.utils.helpers import update_instance

        if not can_create:
            continue

        if related_instance is None:
            related_instance = related_model(**instance_attrs)
            related_instance.save()

            add_after.setdefault(key, []).append(related_instance)
        elif updated_attrs:
            related_instance = update_instance(related_instance, updated_attrs)

    return add_after


def filter_fields(
        model_attrs, fields, key=None, can_create=True, params=None):
    filter_params = params or {}

    for field in (field for field in fields if field.find):
        field_value = field.find_value or model_attrs[field.attribute]

        if field.find_filter:
            filter_attr = field.attribute
            find_filter = field.find_filter

            if key and key in field.attribute:
                filter_attr = filter_attr.split(key)[1]
                find_filter = find_filter if find_filter != 'exact' else 'in'
            elif '|_' in field.attribute or key is not None:

# Path: mtr/sync/lib/manager.py
# class Manager(BaseManager):
#     def convert_value(self, value, field, export=False, action=None):
#     def processor_choices(self):
#     def dataset_choices(self):
#     def action_choices(self):
#     def converter_choices(self):
#     def make_processor(self, settings, from_extension=False):
#     def export_data(self, settings, data=None):
#     def export_data_inline(self, **settings):
#     def import_data_inline(self, **settings):
#     def filter_dataset(self, settings, dataset=None):
#     def prepare_export_dataset(self, settings):
#     def prepare_export_data(self, processor, queryset):
#     def prepare_handlers(self, key_name, processor, model, context=None):
#     def prepare_context(self, settings, path):
#     def prepare_import_data(self, processor, model):
#     def import_data(self, settings, path=None):
#     def prepare_import_dataset(self, settings, processor, model, fields):
#     def model_data(self, settings, processor, model, fields):
# 
# Path: mtr/sync/translation.py



# Path: mtr/sync/lib/actions.py
from django.db import models
from .manager import manager
from ..translation import gettext_lazy as _
from mtr.utils.helpers import update_instance


        if not can_create:
            continue

        if related_instance is None:
            related_instance = related_model(**instance_attrs)
            related_instance.save()

            add_after.setdefault(key, []).append(related_instance)
        elif updated_attrs:
            related_instance = update_instance(related_instance, updated_attrs)

    return add_after


def filter_fields(
        model_attrs, fields, key=None, can_create=True, params=None):
    filter_params = params or {}

    for field in (field for field in fields if field.find):
        field_value = field.find_value or model_attrs[field.attribute]

        if field.find_filter:
            filter_attr = field.attribute
            find_filter = field.find_filter

            if key and key in field.attribute:
                filter_attr = filter_attr.split(key)[1]
                find_filter = find_filter if find_filter != 'exact' else 'in'
            elif '|_' in field.attribute or key is not None:

                continue