Skip to content

Commit

Permalink
new full name support
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed May 17, 2016
1 parent f7ad10c commit 897be49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/budy/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ class BudyAccount(appier_extras.admin.Account):
@classmethod
def _build(cls, model, map):
id = model.get("id", None)
first_name = model.get("first_name", "")
last_name = model.get("last_name", "")
full_name = first_name + (" " + last_name if last_name else "")
if id: model["bag_key"] = cls._get_bag_key(id)
if full_name: model["full_name"] = full_name

@classmethod
def _get_bag_key(cls, id):
Expand Down

0 comments on commit 897be49

Please sign in to comment.