plugin invitations: doesn't raise an exception anymore if url_template is not set while email is not requested
This commit is contained in:
parent
b7a0972237
commit
9ce44321cf
1 changed files with 3 additions and 2 deletions
|
|
@ -165,7 +165,9 @@ class InvitationsPlugin(object):
|
|||
|
||||
self.checkExtra(extra)
|
||||
|
||||
if not 'url_template' in kwargs and not 'message_body' in kwargs:
|
||||
email = kwargs.pop(u'email', None)
|
||||
|
||||
if email is not None and not 'url_template' in kwargs and not 'message_body' in kwargs:
|
||||
raise ValueError(_(u"You need to provide url_template if you use default message body"))
|
||||
|
||||
|
||||
|
|
@ -229,7 +231,6 @@ class InvitationsPlugin(object):
|
|||
language = kwargs.pop(u'language', None)
|
||||
if language is not None:
|
||||
extra[u'language'] = language
|
||||
email = kwargs.pop(u'email', None)
|
||||
|
||||
if email is not None:
|
||||
extra[u'email'] = email
|
||||
|
|
|
|||
Loading…
Reference in a new issue