From 773364c038d8554eb37e5839be0e3f28eda4aa95 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 25 Apr 2023 20:22:22 -0500 Subject: [PATCH] Retry launch for needs_dns instead of going straight to token --- lib/registration.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/registration.rb b/lib/registration.rb index 25c0de85e4ac31408b3cb024c18772ca8689935b..b380e532f8529245a91b62c18274f876f552d929 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -606,6 +606,9 @@ class Registration ::Snikket::Repo.new(db: db).find_by_customer(customer).then do |is| if is.empty? new(customer, tel, db: db) + elsif is[0].bootstrap_token.empty? + # This is a need_dns one, try the launch again + new(customer, tel, db: db).launch(is[0].domain) else GetInvite.for(customer, is[0], tel, db: db) end