MINOR: Fix worksheet service reference (#23664)

This commit is contained in:
Mayur Singal 2025-10-03 16:54:20 +05:30 committed by GitHub
parent 0d860d28aa
commit 7423c3105e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,8 +241,12 @@ public class WorksheetRepository extends EntityRepository<Worksheet> {
}
private void setDefaultFields(Worksheet worksheet) {
worksheet.withService(getContainer(worksheet.getId()));
worksheet.withSpreadsheet(getSpreadsheet(worksheet));
EntityReference spreadsheet = getSpreadsheet(worksheet);
EntityReference service =
getFromEntityRef(
spreadsheet.getId(), SPREADSHEET, Relationship.CONTAINS, Entity.DRIVE_SERVICE, true);
worksheet.withService(service);
worksheet.withSpreadsheet(spreadsheet);
}
@Override