bugraoz93 commented on code in PR #63994:
URL: https://github.com/apache/airflow/pull/63994#discussion_r2969710883


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/variables.py:
##########
@@ -60,6 +61,12 @@ class VariableBody(StrictBaseModel):
     description: str | None = Field(default=None)
     team_name: str | None = Field(max_length=50, default=None)
 
+    @model_validator(mode="after")
+    def validate_team_name(self) -> VariableBody:
+        if self.team_name is not None and not conf.getboolean("core", 
"multi_team"):
+            raise ValueError("team_name cannot be set when multi_team mode is 
disabled")

Review Comment:
   ```suggestion
               raise ValueError("team_name cannot be set when multi_team mode 
is disabled. Please contact with your administrator.")
   ```
   



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