uranusjr commented on code in PR #24079:
URL: https://github.com/apache/airflow/pull/24079#discussion_r903458774
##########
airflow/www/views.py:
##########
@@ -3667,6 +3667,19 @@ class AirflowModelView(ModelView):
CustomSQLAInterface = wwwutils.CustomSQLAInterface
+ def __getattribute__(self, attr):
+ attribute = object.__getattribute__(self, attr)
+ if callable(attribute) and attr in [
+ "add",
+ "edit",
+ "delete",
+ "download",
+ "action",
+ "action_post",
+ ]:
+ return
action_logging(event=f"{self.route_base.strip('/')}.{attr}")(attribute)
+ return attribute
Review Comment:
Let’s add a docstring to explain this as well. We should also add something
to the _class’s docstring_ since readers might not be able to pick up
`__getattribute__`.
--
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]