Skip to content
Permalink
Browse files

small validation change

  • Loading branch information
joamag committed May 16, 2016
1 parent d198a4a commit 9d137d59ea6d23746b1d5191b2c712b60c615075
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/budy/models/account.py
@@ -120,8 +120,10 @@ def _get_bag_key(cls, id):

def pre_create(self):
appier_extras.admin.Account.pre_create(self)
if not hasattr(self, "first_name"): self.first_name = self.username
if not hasattr(self, "avatar"): self._set_avatar_d()
if not hasattr(self, "first_name") or not self.first_name:
self.first_name = self.username
if not hasattr(self, "avatar") or not self.avatar:
self._set_avatar_d()

def post_create(self):
appier_extras.admin.Account.post_create(self)

0 comments on commit 9d137d5

Please sign in to comment.
You can’t perform that action at this time.