From 11e1c2ef82c0b990cec10e5f4cdfbb0c6031bdba Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 16 Feb 2010 20:33:37 -0600 Subject: More save() -> update() cleanup Use update() instead of for x in y: save(). Signed-off-by: Dan McGee --- packages/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/views.py b/packages/views.py index 56c4f7d1..d482c69d 100644 --- a/packages/views.py +++ b/packages/views.py @@ -258,9 +258,7 @@ def flag(request, pkgid): # flag all architectures pkgs = Package.objects.filter( pkgname=pkg.pkgname, repo=pkg.repo) - for package in pkgs: - package.needupdate = 1 - package.save() + pkgs.update(needupdate=True) if not pkg.maintainer: toemail = 'arch-notifications@archlinux.org' -- cgit v1.2.3-54-g00ecf