[extensions-web] review: Use .objects.create
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] review: Use .objects.create
- Date: Mon, 2 Apr 2012 04:34:34 +0000 (UTC)
commit 50d5f434f0e6d4d6e0ab3bcb48198560c6789055
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Apr 1 22:35:53 2012 -0400
review: Use .objects.create
sweettooth/review/views.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 5f18364..4b36ed4 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -264,10 +264,9 @@ def submit_review_view(request, obj):
if newstatus == models.STATUS_ACTIVE and not can_approve_extension(request.user, extension):
return HttpResponseForbidden()
- log = ChangeStatusLog(user=request.user,
- version=obj,
- newstatus=newstatus)
- log.save()
+ log = ChangeStatusLog.objects.create(user=request.user,
+ version=obj,
+ newstatus=newstatus)
obj.status = newstatus
obj.save()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]