diff --git a/console/repositories/app.py b/console/repositories/app.py index 6c05d0c155..1f1fe3a7cd 100644 --- a/console/repositories/app.py +++ b/console/repositories/app.py @@ -462,6 +462,11 @@ def create_default_app_market_if_not_exists(self, markets_all, eid): if markets or os.getenv("DISABLE_DEFAULT_APP_MARKET", False): return + # Due to the default domain name change in the application market, + # a database unique index error will be triggered when created with name. + # For compatibility, so if there is an application market with the same name, no longer create + if markets_all.filter(name=name): + return AppMarket.objects.create( name=name, url=url,