Skip ToS agreement question if ToS value is None (#9245)

* Skip ToS agreement question if ToS value is None

* Add changelog entry

* Typo in CHANGELOG

Co-authored-by: ohemorange <ebportnoy@gmail.com>

* Typo in CHANGELOG

Co-authored-by: ohemorange <ebportnoy@gmail.com>

Co-authored-by: ohemorange <ebportnoy@gmail.com>
This commit is contained in:
osirisinferi
2022-03-24 15:42:47 -07:00
committed by GitHub
co-authored by ohemorange
parent 9ef6110e36
commit 1d45939cab
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -906,7 +906,8 @@ class BackwardsCompatibleClientV2:
return regr_res
else:
client_v2 = cast(ClientV2, self.client)
if "terms_of_service" in client_v2.directory.meta:
if ("terms_of_service" in client_v2.directory.meta and
client_v2.directory.meta.terms_of_service is not None):
_assess_tos(client_v2.directory.meta.terms_of_service)
regr = regr.update(terms_of_service_agreed=True)
return client_v2.new_account(regr)