# HG changeset patch # User Goffi # Date 1495390074 -7200 # Node ID ba613d32ca60d7e58f1ca2f9143d295779b3f26c # Parent 6297817c3dc97539d8220277a74769a5edee31bc plugin invitations: doesn't raise an exception anymore if url_template is not set while email is not requested diff -r 6297817c3dc9 -r ba613d32ca60 src/plugins/plugin_misc_invitations.py --- a/src/plugins/plugin_misc_invitations.py Sun May 21 20:06:07 2017 +0200 +++ b/src/plugins/plugin_misc_invitations.py Sun May 21 20:07:54 2017 +0200 @@ -165,7 +165,9 @@ 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 @@ 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