rosscdh / glynt

LawPal.com - pivot 3
1 stars 0 forks source link

Edit account not saving the name or email for clients #163

Closed jamieconnolly closed 10 years ago

jamieconnolly commented 10 years ago

Inside EnsureCustomerService, we weren't actually saving the User. What I've done is replicate the the structure from the EnsureLawyerService class, and it now flows through and saves it.

I've removed the template cache fragment from templates/partials/nav.html, as (obviously) it won't update their details until the fragment has expired. I thought it would be better to remove it, as it doesn't seem to be beneficial to have this cached yet, over building in a way to expire the fragment when the form has been saved.

rosscdh commented 10 years ago

@jamieconnolly just one thing to modify here mate. then we can merge and move on

jamieconnolly commented 10 years ago

@rosscdh — Done. I've added in that check to lawyer/services.py too

rosscdh commented 10 years ago

@jamieconnolly good work mate.. thanks

rosscdh commented 10 years ago

@jamieconnolly ah! I jsut noticed your using User.objects.filter there are two things here

  1. we already have the user object. self.user so you could call self.user.update()
  2. if you want just 1 element in the ORM you can go User.objects.get(pk=:pk) or the first you can go User.objects.filter().first()
  3. Id prefer you just reuse the user object?
jamieconnolly commented 10 years ago

@rosscdh — Done. I needed to rework the fields_to_update dict so it plays nicely. Again I've put the changes into the lawyer/services.py so we get some consistency.

jamieconnolly commented 10 years ago

@rosscdh — Done. What do you think?

rosscdh commented 10 years ago

@jamieconnolly 2 comments but other than that its looking good.

jamieconnolly commented 10 years ago

@rosscdh — Both of the changes have been done

rosscdh commented 10 years ago

hm tests are not green.. investigating.. ah its rate limiting by crocdoc.. man im going to have to get these socket connections being mocked.

jamieconnolly commented 10 years ago

Ok. Let me know what you find and I'll fix it