Rammohan0504 commited on
Commit
20dc899
·
verified ·
1 Parent(s): 928086f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -221,10 +221,12 @@ def generate_dpr(files):
221
  'ShareType': 'V' # 'V' means Viewer access
222
  })
223
 
224
- # Now, update the DPR record with the ContentDocumentId in the Site_Images field (if it's a text or URL field)
225
- sf.Daily_Progress_Reports__c.update(dpr_record_id, {
226
- 'Site_Images__c': image_content_document_id # Storing the ContentDocumentId directly
227
- })
 
 
228
 
229
  except Exception as e:
230
  pass # No output for Salesforce errors now
 
221
  'ShareType': 'V' # 'V' means Viewer access
222
  })
223
 
224
+ # Now, update the DPR record with the Image URL in the Photo_Uploads__c field
225
+ if image_url:
226
+ # Store the image URL in the Photo_Uploads__c field
227
+ sf.Daily_Progress_Reports__c.update(dpr_record_id, {
228
+ 'Photo_Uploads__c': image_url # Storing the Image URL in the Photo_Uploads__c field
229
+ })
230
 
231
  except Exception as e:
232
  pass # No output for Salesforce errors now