More save() -> update() cleanup

Use update() instead of for x in y: save().

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2010-02-16 20:33:37 -06:00
parent 029359fdd5
commit 11e1c2ef82

View File

@ -258,9 +258,7 @@ def flag(request, pkgid):
# flag all architectures # flag all architectures
pkgs = Package.objects.filter( pkgs = Package.objects.filter(
pkgname=pkg.pkgname, repo=pkg.repo) pkgname=pkg.pkgname, repo=pkg.repo)
for package in pkgs: pkgs.update(needupdate=True)
package.needupdate = 1
package.save()
if not pkg.maintainer: if not pkg.maintainer:
toemail = 'arch-notifications@archlinux.org' toemail = 'arch-notifications@archlinux.org'