mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
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.
This commit is contained in:
committed by
Tim Abbott
parent
b36f09c67f
commit
7185f2c236
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user