tstriker commented on PR #25753:
URL: https://github.com/apache/airflow/pull/25753#issuecomment-1313777602

   @jedcunningham, @potiuk  just a quick heads up: this line 
(https://github.com/astronomer/airflow/blob/52593b061c32d071243c46fe45784a78b57a04b6/airflow/www/app.py#L116)
   
   ```python
       flask_app.json_provider_class = AirflowJsonProvider
   ```
   
   does **nothing**, as the `.json` has already been initiated with the default 
class upon instantiation of `flask_app`
   
   an in-place solution is rather trivial: instead of replacing the class, you 
can replace the instance as per flask documentation
   
   ```python
   flask_app.json = AirflowJsonEncoder(flask_app)
   ```
   
   for reference, the code example in the original flask pull request offers 
both versions, subclassed and assigned after the instantiation:
   https://github.com/pallets/flask/pull/4692#issue-1303581666


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