uranusjr commented on code in PR #24079:
URL: https://github.com/apache/airflow/pull/24079#discussion_r889862081


##########
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:
   If the name list is definite, can we simply override those methods, instead 
of doing this magic function?



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