diff --git a/commands/collection.py b/commands/collection.py index 783b0d98bfabb37b2fb1522ff275aeb22e08e8c0..a21a8a1ba799e4d2f470a38e154891594f56dfae 100755 --- a/commands/collection.py +++ b/commands/collection.py @@ -150,7 +150,7 @@ class Command(BaseCommand): objs = MODELS[ecname].objects.filter(**kwargs).order_by("name") for o in objs: path = os.path.join(export_path, ecname, o.get_json_path()) - print('export "%s" to %s' % (o.name, path), file=self.stdout) + print('export "%s" to %s' % (getattr(o, "name", o), path), file=self.stdout) safe_rewrite(path, o.to_json(), mode=0o644)