diff --git a/saas/humanize.py b/saas/humanize.py index 990f3bc1..b7ec285a 100644 --- a/saas/humanize.py +++ b/saas/humanize.py @@ -134,6 +134,7 @@ 'refund_type': r'(?P\S+)', 'subscriber_full_name': r'(?P(\S| )+)', 'subscription': r'(?P\S+):(?P\S+)', + 'subscriber': r'(?P\S+)', 'sync_on': r'(?P\S+)', 'use_charge': r'(?P\S+)', 'unlock_event': r'(?P\S+)', diff --git a/saas/mixins.py b/saas/mixins.py index 5dc7cf53..1811c0af 100644 --- a/saas/mixins.py +++ b/saas/mixins.py @@ -1355,7 +1355,9 @@ def _as_html_description(transaction_descr, descr = groups.get('descr') if descr: groups.update({'descr': _as_html_description(descr)}) - + if 'subscriber' in groups and 'plan' in groups: + groups.update({'subscription': "%s:%s" % ( + groups.get('subscriber'), groups.get('plan'))}) result = trans % groups pos = transaction_descr.rfind(' - ') if pos > 0: