Explorar o código

HUE-6245 [optimizer] Properly json decode the risk source platform

Romain Rigaux %!s(int64=9) %!d(string=hai) anos
pai
achega
5768997f31
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      desktop/libs/metadata/src/metadata/optimizer_api.py

+ 1 - 1
desktop/libs/metadata/src/metadata/optimizer_api.py

@@ -380,7 +380,7 @@ def upload_table_stats(request):
   response = {'status': -1}
 
   db_tables = json.loads(request.POST.get('db_tables'), '[]')
-  source_platform = request.POST.get('sourcePlatform', 'hive')
+  source_platform = json.loads(request.POST.get('sourcePlatform', '"hive"'))
   with_columns = json.loads(request.POST.get('with_columns', 'false'))
   with_ddl = json.loads(request.POST.get('with_ddl', 'false'))