SHARE
TWEET

Untitled

a guest Jun 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. self.query_headers = "([ac_serial_reg_key],[activity_date],
  2.     [aircraft_delivery_date],[activity_name],[activity_remark],
  3.     [aircraft_category],[aircraft_financial_status],[aircraft_group],
  4.     [aircraft_model],[aircraft_operational_status],[aircraft_registration_number], [aircraft_serial_number],
  5.     [aircraft_type],[engine_model],[engine_type],[operator_name]
  6. )"
  7.      
  8. self.query_values = ''
  9.  
  10. for idx, set in enumerate(self.response.json()['results'], start=1):
  11.     self.query_values += "("
  12.     self.query_values += "'"+str(set['aircraft_registration_number'])+"_"+str(set['aircraft_serial_number'])+"',"
  13.     self.query_values += self.validate_date(set['activity_date'])+","
  14.     self.query_values += self.validate_date(set['aircraft_delivery_date'])+","
  15.     self.query_values += "'"+str(set['activity_name'])+"',"
  16.     self.query_values += "'"+str(set['activity_remark'])+"',"
  17.     self.query_values += "'"+str(set['aircraft_category'])+"',"
  18.     self.query_values += "'"+str(set['aircraft_financial_status'])+"',"
  19.     self.query_values += "'"+str(set['aircraft_group'])+"',"
  20.     self.query_values += "'"+str(set['aircraft_model'])+"',"
  21.     self.query_values += "'"+str(set['aircraft_operational_status'])+"',"
  22.     self.query_values += "'"+str(set['aircraft_registration_number'])+"',"
  23.     self.query_values += "'"+str(set['aircraft_serial_number'])+"',"
  24.     self.query_values += "'"+str(set['aircraft_type_lar'])+"',"
  25.     self.query_values += "'"+str(set['engine_model'])+"',"
  26.     self.query_values += "'"+str(set['engine_type'])+"',"
  27.     self.query_values += "'"+str(set['operator_name'])+"'"
  28.     self.query_values += ")"                    
  29.  
  30. if idx < self.response.json()['results_this_page']:
  31.     self.query_values += ","
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top