def search_property_with_advanced_criteria(property_dict): property_dict = json.loads(property_dict) budget_mapper = { "0": 0, "25Lac": 2500000, "50Lac": 5000000, "75Lac": 7500000, "1Cr": 10000000, "2Cr": 20000000, "3Cr": 30000000, "4Cr": 40000000, "5Cr": 50000000, "10Cr": 100000000 } amenities_list = [ amenity for amenity in property_dict.get("amenities", "").split(',') if amenity ] property_dict["amenities"] = amenities_list property_dict["min_budget"] = int(property_dict.get("min_budget", 0)) property_dict["max_budget"] = int(property_dict.get("max_budget", 0)) property_dict["records_per_page"] = 10 property_dict["page_number"] = 1 property_dict["request_source"] = "Hunterscamp" property_dict["min_area"] = int(property_dict.get("min_area", 0)) property_dict["max_area"] = int(property_dict.get("max_area", 0)) print property_dict get_location_subtype_options(property_dict) try: return api.search_property(json.dumps(property_dict)) except Exception, e: frappe.throw(e)
def search_property_with_advanced_criteria(property_dict): property_dict = json.loads(property_dict) budget_mapper = {"0":0, "25Lac":2500000, "50Lac":5000000, "75Lac":7500000, "1Cr":10000000, "2Cr":20000000, "3Cr":30000000, "4Cr":40000000, "5Cr":50000000, "10Cr":100000000} amenities_list = [amenity for amenity in property_dict.get("amenities","").split(',') if amenity] property_dict["amenities"] = amenities_list property_dict["min_budget"] = int(property_dict.get("min_budget",0)) property_dict["max_budget"] = int(property_dict.get("max_budget",0)) property_dict["records_per_page"] = 10 property_dict["page_number"] = 1 property_dict["request_source"] = "Hunterscamp" property_dict["min_area"] = int(property_dict.get("min_area",0)) property_dict["max_area"] = int(property_dict.get("max_area",0)) print property_dict get_location_subtype_options(property_dict) try: return api.search_property(json.dumps(property_dict)) except Exception,e: frappe.throw(e)
def search_property(data): return api.search_property(data)
def search_property(data): return api.search_property(data)