aboutsummaryrefslogtreecommitdiffstats
path: root/servo
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-10-26 21:25:51 +0200
committerFilipp Lepalaan <filipp@mac.com>2015-10-26 21:25:51 +0200
commit5673b00e6c9ed382f962a1201693e8c047cf8468 (patch)
tree3603c1233c8d060daef14bef3eb15f4f550b6a47 /servo
parentf9c379759ae437b191dcd313abb8a345b59fa4e9 (diff)
downloadServo-5673b00e6c9ed382f962a1201693e8c047cf8468.tar.gz
Servo-5673b00e6c9ed382f962a1201693e8c047cf8468.tar.bz2
Servo-5673b00e6c9ed382f962a1201693e8c047cf8468.zip
Fix rule matching with create
Diffstat (limited to 'servo')
-rw-r--r--servo/tasks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/servo/tasks.py b/servo/tasks.py
index 64158c7..3323dd4 100644
--- a/servo/tasks.py
+++ b/servo/tasks.py
@@ -38,10 +38,10 @@ def apply_rules(event):
order = event.content_object
for r in rules:
- if r['event'] == 'create':
- event.description = r['event']
- if (r['event'] == event.action) and (r['match'] == event.description):
+ if (r['event'] == event.action) and
+ (r['match'] == event.description) or
+ (r['event'] == 'create'):
if isinstance(r['data'], dict):
tpl_id = r['data']['template']