@@ -102,23 +102,23 @@ def callback3(request_id, response, exception):
102102 # Update the Google Event
103103 batch1 .add (google .calendar .events ().update (calendarId = google .CALENDAR_CAMPS_ID , eventId = camp_info .get ("event_id" ), body = event , sendUpdates = "all" ), callback = callback1 )
104104
105- def __camp_pictures (google , sf , camp_info ):
106- # If holiday specific folder does not exist, create it
107- if camp_info .get ("picture_grand_parent_id" ) == None :
108- created_folder_id = google .create_camp_pictures_folder (f"{ camp_info .get ('holiday_name' )} " )
109- sf .sf .Picklist__c .update (camp_info ["holiday_id" ], {"Google_Drive_Pictures_ID__c" : created_folder_id })
110- camp_info ["picture_grand_parent_id" ] = created_folder_id
111-
112- # If week specific folder does not exist, create it
113- if camp_info .get ("picture_parent_id" ) == None :
114- created_folder_id = google .create_camp_pictures_folder (f"{ camp_info .get ('picture_parent_name' )} " , parent = camp_info ["picture_grand_parent_id" ])
115- sf .sf .Picklist__c .update (camp_info ["week_id" ], {"Google_Drive_Pictures_ID__c" : created_folder_id })
116- camp_info ["picture_parent_id" ] = created_folder_id
117-
118- # If camp specific folder does not exist, create it
119- if camp_info ["pictures_id" ] == None :
120- created_folder_id = google .create_camp_pictures_folder (f"{ camp_info .get ('pictures_name' )} " , parent = camp_info ["picture_parent_id" ])
121- sf .sf .Opportunity .update (camp_info ["id" ], {"Google_Drive_Pictures__c" : created_folder_id })
105+ # def __camp_pictures(google, sf, camp_info):
106+ # # If holiday specific folder does not exist, create it
107+ # if camp_info.get("picture_grand_parent_id") == None:
108+ # created_folder_id = google.create_camp_pictures_folder(f"{camp_info.get('holiday_name')}")
109+ # sf.sf.Picklist__c.update(camp_info["holiday_id"], {"Google_Drive_Pictures_ID__c": created_folder_id})
110+ # camp_info["picture_grand_parent_id"] = created_folder_id
111+ #
112+ # # If week specific folder does not exist, create it
113+ # if camp_info.get("picture_parent_id") == None:
114+ # created_folder_id = google.create_camp_pictures_folder(f"{camp_info.get('picture_parent_name')}", parent=camp_info["picture_grand_parent_id"])
115+ # sf.sf.Picklist__c.update(camp_info["week_id"], {"Google_Drive_Pictures_ID__c": created_folder_id})
116+ # camp_info["picture_parent_id"] = created_folder_id
117+ #
118+ # # If camp specific folder does not exist, create it
119+ # if camp_info["pictures_id"] == None:
120+ # created_folder_id = google.create_camp_pictures_folder(f"{camp_info.get('pictures_name')}", parent=camp_info["picture_parent_id"])
121+ # sf.sf.Opportunity.update(camp_info["id"], {"Google_Drive_Pictures__c": created_folder_id})
122122
123123def update_and_create_camps_per_week (google , sf , week_codes ):
124124 # Get the camp details for the specified weeks
@@ -136,7 +136,7 @@ def update_and_create_camps_per_week(google, sf, week_codes):
136136 for camp_info in camps :
137137 try :
138138 __camp_event (google , sf , camp_info , batch1 , batch2 , batch3 )
139- __camp_pictures (google , sf , camp_info )
139+ # __camp_pictures(google, sf, camp_info)
140140 print (f'[SUCCESS] Event created for { camp_info .get ("code" )} ' )
141141 except Exception as e :
142142 raise ValueError (f'[ERROR] { e } ' )
@@ -165,7 +165,7 @@ def update_and_create_camps(google, sf, camp_id):
165165 for camp_info in camps :
166166 try :
167167 __camp_event (google , sf , camp_info , batch1 , batch2 , batch3 )
168- __camp_pictures (google , sf , camp_info )
168+ # __camp_pictures(google, sf, camp_info)
169169 print (f'[SUCCESS] Event created for { camp_info .get ("code" )} ' )
170170 except Exception as e :
171171 raise ValueError (f'[ERROR] { e } ' )
0 commit comments