From c089551e08f5920a3c748559955396071b468090 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 25 Feb 2013 11:14:04 +0000 Subject: [PATCH] wait for poster --- pandora/item/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 3a254e12..21c9ed78 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -7,7 +7,6 @@ import random from urlparse import urlparse from urllib import quote import time -import re import Image from django.db.models import Count, Sum @@ -483,7 +482,11 @@ def add(request): i = models.Item() i.data['title'] = data['title'] i.user = request.user - i.save() + p = i.save() + if p: + p.wait() + else: + i.make_poster(True) response = json_response(status=200, text='created') response['data'] = i.get_json() return render_to_json_response(response)