pabloem commented on a change in pull request #16118:
URL: https://github.com/apache/beam/pull/16118#discussion_r762431468



##########
File path: playground/infrastructure/helper.py
##########
@@ -236,39 +237,52 @@ def _validate(tag: dict, supported_categories: List[str]) 
-> bool:
   """
   valid = True
   for field in fields(TagFields):
-    if tag.get(field.default) is None:
+    if field.default not in tag:
       logging.error(
-        "tag doesn't contain %s field: %s \n"
-        "Please, check that this field exists in the beam playground tag."
-        "If you are sure that this field exists in the tag"
-        " check the format of indenting.", field.default, tag.__str__())
+          "tag doesn't contain %s field: %s \n"
+          "Please, check that this field exists in the beam playground tag."
+          "If you are sure that this field exists in the tag"
+          " check the format of indenting.",
+          field.default,
+          tag.__str__())
+      valid = False
+
+    name = tag.get(TagFields.NAME)
+    if name == "":

Review comment:
       ```suggestion
       if not name:
   ```
   
   This would work for `None` and empty string. Maybe that would be useful?




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


Reply via email to