feat: use en-US as fallback recommend app if using unmaintained language (#3063)

This commit is contained in:
takatost 2024-04-01 17:15:59 +09:00 committed by GitHub
parent 132269618d
commit 32e83e00e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,6 +52,12 @@ class RecommendedAppListApi(Resource):
RecommendedApp.language == language_prefix
).all()
if len(recommended_apps) == 0:
recommended_apps = db.session.query(RecommendedApp).filter(
RecommendedApp.is_listed == True,
RecommendedApp.language == languages[0]
).all()
categories = set()
current_user.role = TenantService.get_user_role(current_user, current_user.current_tenant)
recommended_apps_result = []