diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-11-27 10:15:59 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-11-27 10:15:59 +0200 |
commit | fbc56b5be6443bc681ab67283ab7a3e68b3d68c9 (patch) | |
tree | c5021aca5929d1fbb45c172bf898ba5a73d83249 /servo/views/note.py | |
parent | c605f2bc0bc4b098e231b6469f588605e96e4dd9 (diff) | |
download | Servo-fbc56b5be6443bc681ab67283ab7a3e68b3d68c9.tar.gz Servo-fbc56b5be6443bc681ab67283ab7a3e68b3d68c9.tar.bz2 Servo-fbc56b5be6443bc681ab67283ab7a3e68b3d68c9.zip |
Cleanup
Diffstat (limited to 'servo/views/note.py')
-rw-r--r-- | servo/views/note.py | 4 |
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) |