Skip to content

Commit bacb28b

Browse files
rename sub_tag
1 parent bb94600 commit bacb28b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

dojo/api_v2/views.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,16 +1253,15 @@ def remove_tags(self, request, pk=None):
12531253
logger.debug("Tags to delete: %s", del_tags)
12541254
for tag in del_tags:
12551255
# sub_tag = tagulous.utils.parse_tags(tag)
1256-
sub_tag = tag
1257-
logger.debug("Sub tag: %s", sub_tag)
1258-
if sub_tag not in all_tags:
1256+
logger.debug("Sub tag: %s", tag)
1257+
if tag not in all_tags:
12591258
return Response(
12601259
{
1261-
"error": f"'{sub_tag}' is not a valid tag in list '{all_tags}'",
1260+
"error": f"'{tag}' is not a valid tag in list '{all_tags}'",
12621261
},
12631262
status=status.HTTP_400_BAD_REQUEST,
12641263
)
1265-
all_tags.remove(sub_tag)
1264+
all_tags.remove(tag)
12661265
new_tags = tagulous.utils.render_tags(all_tags)
12671266
finding.tags = new_tags
12681267
finding.save()

0 commit comments

Comments
 (0)