[ckan-changes] [okfn/ckan] 2c76ed: [#1178] Send email to the invited user

GitHub noreply at github.com
Fri Aug 16 14:18:11 UTC 2013


  Branch: refs/heads/1178-users-invitations
  Home:   https://github.com/okfn/ckan
  Commit: 2c76ed3bd7bc2df180404a23ff527ddac0cd4efe
      https://github.com/okfn/ckan/commit/2c76ed3bd7bc2df180404a23ff527ddac0cd4efe
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/lib/mailer.py
    M ckan/logic/action/create.py
    M ckan/tests/lib/test_mailer.py
    M ckan/tests/logic/test_action.py

  Log Message:
  -----------
  [#1178] Send email to the invited user

I removed the time.sleep(0.1) on TestMailer. Looking through the code, I
couldn't find anywhere where a timer looked needed. And I ran these tests a
hundred times without the timer to see if I could make them fail, but no. So, I
guess they're not needed anymore.

I also had to move the RESET_LINK_MESSAGE inside get_reset_link_body(). This
was because, when importing ckan.lib.mailer in ckan.logic.action.create.py, I
got:

    TypeError: No object (name: translator) has been registered for this thread

This seems to be because we were using _() before pylons had a change to set up
the translator. Moving it inside the method solves this.





More information about the ckan-changes mailing list