Vitor-Avila commented on code in PR #35541:
URL: https://github.com/apache/superset/pull/35541#discussion_r2409184163


##########
superset/daos/tag.py:
##########
@@ -122,7 +122,7 @@ def get_by_name(name: str, type_: TagType = TagType.custom) 
-> Tag:
             .first()
         )
         if not tag:
-            tag = get_tag(name, db.session, type_)
+            tag = get_or_create_tag(name, db.session, type_)
         return tag

Review Comment:
   While you're at it, do you think it makes sense to also re-name this to 
`get_or_create_by_name`? The docstring is also a bit confusing currently as it 
says first "none otherwise" but then there's the "important!" block that says 
one would be created.



-- 
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]

Reply via email to