@ -162,8 +162,6 @@ def check_vehicle_update(vehicle_list=None):
Vehicle_req_list . append ( d )
except Exception as e :
Vehicle_req_list . append ( { " Error " : e } )
elif current_version == ( float ( data1_global [ 0 ] [ ' version ' ] ) - 1.00 ) :
data = frappe . db . sql ( ''' SELECT name as Name,max(version) as Version,vehicle_id as Vehicle,language as Language FROM {} .tabPublish where vehicle= ' {} ' and language= ' {} ' and publish_status= ' Published '
@ -171,6 +169,7 @@ def check_vehicle_update(vehicle_list=None):
current_db_name , vehicle , l_id , current_version ) , as_dict = True )
try :
for d in data :
file_name = None
try :
file_name = " /files/json_files/global/ " + vehicle + " / " + vehicle + " - " + d [ ' Language ' ] + " _v " + str ( d [ ' Version ' ] ) + " .json "
file_size = os . path . getsize ( base_url + file_name )
@ -179,7 +178,7 @@ def check_vehicle_update(vehicle_list=None):
d [ ' Error ' ] = None
except :
file_name = None
# file_name= None
file_size = None
d [ ' JsonURL ' ] = file_name
d [ ' FileSize ' ] = file_size
@ -219,13 +218,10 @@ def check_vehicle_update(vehicle_list=None):
Vehicle_req_list . append ( { " Error " : e2 } )
elif ( float ( data1_global [ 0 ] [ ' version ' ] ) - 1.00 ) < current_version < float ( data1_global [ 0 ] [ ' version ' ] ) :
Vehicle_req_list . append ( { ' Cur_ver ' : current_version , " Global Ver " : data1 [ 0 ] [ ' version ' ] } )
if current_version < float ( data1 [ 0 ] [ ' version ' ] ) :
Vehicle_req_list . append ( { " loop " : 4.1 } )
data = frappe . db . sql ( ''' SELECT name as Name,max(version) as Version,vehicle_id as Vehicle,language as Language FROM {} .tabPublish where vehicle= ' {} ' and language= ' {} ' and publish_status= ' Published '
and publish_type = ' Global ' and vehicle_status = ' Active ' and version > ' {} ' order by version ASC ; ''' .format(
current_db_name , vehicle , l_id , current_version ) , as_dict = True )
Vehicle_req_list . append ( { " Data " : ' Append ' } )
try :
for d in data :
try :