aboutsummaryrefslogtreecommitdiffstats
path: root/servo/views/note.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-11-27 10:15:59 +0200
committerFilipp Lepalaan <filipp@mac.com>2015-11-27 10:15:59 +0200
commitfbc56b5be6443bc681ab67283ab7a3e68b3d68c9 (patch)
treec5021aca5929d1fbb45c172bf898ba5a73d83249 /servo/views/note.py
parentc605f2bc0bc4b098e231b6469f588605e96e4dd9 (diff)
downloadServo-fbc56b5be6443bc681ab67283ab7a3e68b3d68c9.tar.gz
Servo-fbc56b5be6443bc681ab67283ab7a3e68b3d68c9.tar.bz2
Servo-fbc56b5be6443bc681ab67283ab7a3e68b3d68c9.zip
Cleanup
Diffstat (limited to 'servo/views/note.py')
-rw-r--r--servo/views/note.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/servo/views/note.py b/servo/views/note.py
index e406cc1..7a8feaf 100644
--- a/servo/views/note.py
+++ b/servo/views/note.py
@@ -269,8 +269,8 @@ def render_template(request, order_id=None):
def templates(request, template_id=None):
- if template_id is not None:
- tpl = Template.objects.get(pk=template_id)
+ if template_id:
+ tpl = get_object_or_404(Template, pk=template_id)
content = tpl.content
if request.session.get('current_order_id'):
tpl = template.Template(content)