Prepend a magic number to bootstrap setup to identify them as valid bootstrap setups

This commit is contained in:
Roberto Rosario
2012-10-16 02:44:01 -04:00
parent b076c73d2b
commit 1de90cfaa9
6 changed files with 30 additions and 6 deletions

View File

@@ -91,7 +91,8 @@ class BootstrapSetup(models.Model):
def save(self, *args, **kwargs):
update_metadata = kwargs.pop('update_metadata', True)
if update_metadata:
self.fixture = '%s\n%s' % (
self.fixture = '%s\n%s\n%s' % (
BootstrapModel.get_magic_number(),
self.get_metadata_string(),
self.cleaned_fixture
)