rusackas commented on code in PR #43390:
URL: https://github.com/apache/superset/pull/43390#discussion_r3832144529
##########
superset/commands/tag/delete.py:
##########
@@ -134,10 +134,33 @@ def run(self) -> None:
TagDAO.delete_tags(self._tags)
def validate(self) -> None:
- exceptions = []
- # Validate tag exists
- for tag in self._tags:
- if not TagDAO.find_by_name(tag):
- exceptions.append(TagNotFoundError(tag))
+ exceptions: list[TagNotFoundError | TagDeleteFailedError] = []
+ for tag_name in self._tags:
+ tag = TagDAO.find_by_name(tag_name)
+ # Validate tag exists
+ if not tag:
+ exceptions.append(TagNotFoundError(tag_name))
+ continue
Review Comment:
Good catch, fixed in 345d7c3fc9.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]