[PATCH v2 12/16] management: Resolve a bug with 'retag' command
Stephen Finucane
stephen.finucane at intel.com
Sat Aug 22 00:32:16 AEST 2015
Calling 'retag' without a list of patch IDs will cause an Exception.
This is due to an invalid attempt to filter patches using this empty
argument. Resolve this by only filtering when we have arguments to
filter with.
Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
patchwork/management/commands/retag.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/patchwork/management/commands/retag.py b/patchwork/management/commands/retag.py
index e07594a..677d1d6 100644
--- a/patchwork/management/commands/retag.py
+++ b/patchwork/management/commands/retag.py
@@ -12,7 +12,9 @@ class Command(BaseCommand):
qs = Patch.objects
if args:
- qs = qs.filter(id__in = args)
+ qs = qs.filter(id__in=args)
+ else:
+ qs = qs.all()
count = qs.count()
i = 0
--
2.0.0
More information about the Patchwork
mailing list