fix bug desc/copyright/privacy_policy none (#796)
This commit is contained in:
parent
220f7c81e9
commit
d8b712b325
@ -55,7 +55,7 @@ class InsertExploreAppListApi(Resource):
|
|||||||
|
|
||||||
app = App.query.filter(App.id == args['app_id']).first()
|
app = App.query.filter(App.id == args['app_id']).first()
|
||||||
if not app:
|
if not app:
|
||||||
raise NotFound('App not found')
|
raise NotFound(f'App \'{args["app_id"]}\' is not found')
|
||||||
|
|
||||||
site = app.site
|
site = app.site
|
||||||
if not site:
|
if not site:
|
||||||
@ -63,10 +63,12 @@ class InsertExploreAppListApi(Resource):
|
|||||||
copy_right = args['copyright'] if args['copyright'] else ''
|
copy_right = args['copyright'] if args['copyright'] else ''
|
||||||
privacy_policy = args['privacy_policy'] if args['privacy_policy'] else ''
|
privacy_policy = args['privacy_policy'] if args['privacy_policy'] else ''
|
||||||
else:
|
else:
|
||||||
desc = site.description if (site.description if not args['desc'] else args['desc']) else ''
|
desc = site.description if site.description else \
|
||||||
copy_right = site.copyright if (site.copyright if not args['copyright'] else args['copyright']) else ''
|
args['desc'] if args['desc'] else ''
|
||||||
privacy_policy = site.privacy_policy \
|
copy_right = site.copyright if site.copyright else \
|
||||||
if (site.privacy_policy if not args['privacy_policy'] else args['privacy_policy']) else ''
|
args['copyright'] if args['copyright'] else ''
|
||||||
|
privacy_policy = site.privacy_policy if site.privacy_policy else \
|
||||||
|
args['privacy_policy'] if args['privacy_policy'] else ''
|
||||||
|
|
||||||
recommended_app = RecommendedApp.query.filter(RecommendedApp.app_id == args['app_id']).first()
|
recommended_app = RecommendedApp.query.filter(RecommendedApp.app_id == args['app_id']).first()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user