Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create_user: Remove assert about needing prereg_user if realm_creation.
Closes zulip#22274. This assertion was added in 4b903c5 where it may have made sense, because indeed when doing realm creation there was always a PreregistrationUser (created because realms were created via going to a generated realm creation link). With the addition of the create_realm command that's no longer the case. It would be unnatural to create a PreregistrationUser in the realm_creation command, because there is no confirmation link for it to be tied to - and it just doesn't make sense conceptually. The intended, correct behavior added in 4b903c5 is still maintained - the code lower down correctly handles the (prereg_user is None and realm_creation) case.
- Loading branch information