You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2023/05/29 10:04:30 UTC

[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #31583: Trigger Button - Implement Part 2 of AIP-50

pierrejeambrun commented on code in PR #31583:
URL: https://github.com/apache/airflow/pull/31583#discussion_r1209150951


##########
airflow/www/views.py:
##########
@@ -1963,6 +1962,7 @@ def trigger(self, session: Session = NEW_SESSION):
                 form_fields[k]["schema"]["custom_html_form"] = Markup(
                     form_fields[k]["schema"]["custom_html_form"]
                 )
+        ui_fields_defined = any("const" not in f["schema"] for f in form_fields.values())

Review Comment:
   I feel like this check is not self explanatory. Took me a while to realize that we are looking for at least 1 field that is not a constant to display the UI form. Maybe a comment could help, or directly checking against the `dag.params` values. (Here we check against UI elements that will potentially not be displayed, to know if we should display them)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org