aboutsummaryrefslogtreecommitdiffstats
path: root/servo/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'servo/tasks.py')
-rw-r--r--servo/tasks.py5
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)