Skip to content

Instantly share code, notes, and snippets.

@dmishe
Created August 19, 2009 14:45
Show Gist options
  • Save dmishe/170383 to your computer and use it in GitHub Desktop.
Save dmishe/170383 to your computer and use it in GitHub Desktop.
def save(self, *args, **kwargs):
if not self.slug:
self.slug = slugify(self.name)
if not self.slug_unique:
self.slug_unique = unique_slug(self.slug)
try:
if not self.added_by:
self.added_by_id = 9
except Member.DoesNotExist:
pass
super(Person, self).save(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment