From 7185f2c23637686b88094d132dec171832444ac9 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Sun, 14 Sep 2025 14:26:46 +0200 Subject: [PATCH] forms: Set realm_creation field one time when initializing form. In commit c7a08f3b77, we started setting the realm_creation field in both the RegistrationForm and its superclass, RealmDetailsForm, which was likely a copy and paste error. Since we only need to set the realm_creation field once when initializing the form fields, we set it in the RealmDetailsForm, which also removes any confusion related to the comment about removing extra kwargs in the RegistrationForm initialization. --- zerver/forms.py | 1 - 1 file changed, 1 deletion(-) diff --git a/zerver/forms.py b/zerver/forms.py index f96a0a3a90..f79a4b2c48 100644 --- a/zerver/forms.py +++ b/zerver/forms.py @@ -174,7 +174,6 @@ class RegistrationForm(RealmDetailsForm): def __init__(self, *args: Any, **kwargs: Any) -> None: # Since the superclass doesn't except random extra kwargs, we # remove it from the kwargs dict before initializing. - self.realm_creation = kwargs["realm_creation"] self.realm = kwargs.pop("realm", None) super().__init__(*args, **kwargs)