mirror of https://github.com/zulip/zulip.git
Make name_changes_disabled() work with no argument.
This commit is contained in:
parent
e109b50152
commit
01c9bb2d5e
|
@ -74,7 +74,9 @@ from zerver.lib.rest import rest_dispatch as _rest_dispatch
|
|||
rest_dispatch = csrf_exempt((lambda request, *args, **kwargs: _rest_dispatch(request, globals(), *args, **kwargs)))
|
||||
|
||||
def name_changes_disabled(realm):
|
||||
# type: (Realm) -> bool
|
||||
# type: (Optional[Realm]) -> bool
|
||||
if realm is None:
|
||||
return settings.NAME_CHANGES_DISABLED
|
||||
return settings.NAME_CHANGES_DISABLED or realm.name_changes_disabled
|
||||
|
||||
@require_post
|
||||
|
|
Loading…
Reference in New Issue