Commit d38d83ba authored by Andrey Veltischev's avatar Andrey Veltischev
Browse files

Fix PolyModel export func according to base model

parent fd870214
......@@ -434,11 +434,10 @@ class PolyModelType(CompoundType):
def _export(self, model_instance, format, context):
model_class = model_instance.__class__
if not self.is_allowed_model(model_instance):
raise Exception("Cannot export: {} is not an allowed type".format(model_class))
return model_instance.export(context=context)
return export_loop(type(model_instance), model_instance, context=context)
def _get_candidates(self):
candidates = self.model_classes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment