Permalink
Browse files

OOPS

  • Loading branch information...
1 parent 006dfaf commit d26ace8adcfa18c8705bd061cdbeba66eb485b4f Mike Krieger committed Dec 11, 2008
Showing with 3 additions and 2 deletions.
  1. +3 −2 greetings/views.py
View
5 greetings/views.py
@@ -184,13 +184,14 @@ def new_user(request):
def get_or_create_person_from_phone(phone):
try:
- user = find_person_from_lists(phone_list=(phone,))
+ phone_obj = Phone.objects.get(number=phone)
+ user = find_person_from_lists(phone_list=(phones,))
if user:
return user
else:
user = Person()
user.save()
- user.phones.add(phone)
+ user.phones.add(phone_obj)
return user
except Exception, e:
return None

0 comments on commit d26ace8

Please sign in to comment.