diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-11-28 17:58:52 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-11-28 17:58:52 +0200 |
commit | b0327e0d012a50129ac7446d4ac35fdac8bd28d0 (patch) | |
tree | 4e2fc574b53b68e532e3ee5201744d4230993f8c /servo | |
parent | 0c71688b616af725abba9ebbd6b234ea4a6d0c06 (diff) | |
download | Servo-b0327e0d012a50129ac7446d4ac35fdac8bd28d0.tar.gz Servo-b0327e0d012a50129ac7446d4ac35fdac8bd28d0.tar.bz2 Servo-b0327e0d012a50129ac7446d4ac35fdac8bd28d0.zip |
Fixed issue with static template rendering in rules
Diffstat (limited to 'servo')
-rw-r--r-- | servo/tasks.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servo/tasks.py b/servo/tasks.py index bf492d4..605e0e0 100644 --- a/servo/tasks.py +++ b/servo/tasks.py @@ -34,7 +34,8 @@ def get_rules(): @shared_task def apply_rules(event): - """Applies configured rules + """ + Applies configured rules event is the Event object that was triggered """ @@ -50,6 +51,8 @@ def apply_rules(event): if isinstance(r['data'], dict): tpl_id = r['data']['template'] r['data'] = Template.objects.get(pk=tpl_id).render(order) + else: + r['data'] = Template(content=r['data']).render(order) if r['action'] == "set_queue": order.set_queue(r['data'], user) |