From 5568b3b612dc9517377176879b038df74a07ed0e Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 27 Mar 2021 05:27:02 -0400 Subject: [PATCH] fix adding and removing tags via admin snapshot list --- archivebox/core/admin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/archivebox/core/admin.py b/archivebox/core/admin.py index 517ec79b..91feb07b 100644 --- a/archivebox/core/admin.py +++ b/archivebox/core/admin.py @@ -213,10 +213,9 @@ class SnapshotAdmin(SearchResultsAdminMixin, admin.ModelAdmin): delete_snapshots.short_description = "Delete" def add_tag(self, request, queryset): - if tag and tag.id: - tag = request.POST['tag'] - for obj in queryset: - obj.tags.add(tag) + tag = request.POST['tag'] + for obj in queryset: + obj.tags.add(tag) add_tag.short_description = "Add tag"