Skip to content

Instantly share code, notes, and snippets.

@AntelopeSalad
Created January 29, 2014 18:52
Show Gist options
  • Save AntelopeSalad/8694417 to your computer and use it in GitHub Desktop.
Save AntelopeSalad/8694417 to your computer and use it in GitHub Desktop.
def save(self, *args, **kwargs):
if self.value is None:
self.value = 0
super().save(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment