ashb commented on a change in pull request #5530: [AIRFLOW-1740] Fix xcom 
creation and update via UI
URL: https://github.com/apache/airflow/pull/5530#discussion_r300398233
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -2685,6 +2685,9 @@ class XComView(wwwutils.SuperUserMixin, 
AirflowModelView):
     filter_converter = wwwutils.UtcFilterConverter()
     form_overrides = dict(execution_date=DateTimeField)
 
+    def on_model_change(self, form, model, is_created):
+        XCom.set(**form.data)
 
 Review comment:
   I think that this includes the fields are known to the form, so this should 
be okay.
   
   But this will end up storing two records - one that we create here, and 
another from 
https://github.com/flask-admin/flask-admin/blob/8341a9ceae6e9206cb6b91a3b896ed02faaafccc/flask_admin/contrib/sqla/view.py#L1129-L1132

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to