From f203947836f89233c69232d54e602c3b7e86145d Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 6 Oct 2012 05:46:43 -0400 Subject: [PATCH] Don't add empty fixtures --- apps/bootstrap/managers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/bootstrap/managers.py b/apps/bootstrap/managers.py index ae997b8f9b..6e9a457911 100644 --- a/apps/bootstrap/managers.py +++ b/apps/bootstrap/managers.py @@ -21,5 +21,7 @@ class BootstrapSetupManager(models.Manager): def dump(self, serialization_format): result = [] for bootstrap_model in BootstrapModel.get_all(): - result.append(bootstrap_model.dump(serialization_format)) + model_fixture = bootstrap_model.dump(serialization_format) + if '[]' not in model_fixture and '{}' not in model_fixture: + result.append(model_fixture) return '\n'.join(result)