def build_tree(apps, schema_editor): # We can't import the Person model directly as it may be a newer # version than this migration expects. We use the historical version. ProceedingMeta = apps.get_model("river", "ProceedingMeta") for pm in ProceedingMeta.objects.all(): ProceedingMetaService.build_tree(pm)
def post_save_model(sender, instance, *args, **kwargs): from river.services.proceeding_meta import ProceedingMetaService ProceedingMetaService.build_tree(instance)