From bc2792e055f2bab9ee865ee6edbdc02a6e3a8c3e Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 May 2020 16:30:34 +0500 Subject: [PATCH] Fix trace wnen export fm.mibpreference collection by command. --- commands/collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/collection.py b/commands/collection.py index 783b0d98bf..a21a8a1ba7 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) -- GitLab