betodealmeida commented on a change in pull request #16375:
URL: https://github.com/apache/superset/pull/16375#discussion_r695294282



##########
File path: superset/reports/commands/exceptions.py
##########
@@ -167,6 +167,21 @@ def __init__(self) -> None:
         super().__init__([_("Name must be unique")], field_name="name")
 
 
+class ReportScheduleCreationMethodUniquenessValidationError(ValidationError):
+    """
+    Marshmallow validation error for Report Schedule with creation method 
charts
+    or dashboards already existing on a report.
+    """
+
+    def __init__(self) -> None:
+        status = 409

Review comment:
       Sorry, this should be on the class, not inside `__init__`:
   
   ```
   class ReportScheduleCreationMethodUniquenessValidationError(ValidationError):
       status = 409
   
       def __init__(self) -> None:
          super().__init__(...)
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to