Skip to content

Commit

Permalink
check organization (#4194)
Browse files Browse the repository at this point in the history
  • Loading branch information
guowl3 authored Jan 22, 2025
1 parent 36d3920 commit e5caabd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
import com.oceanbase.odc.service.iam.ProjectPermissionValidator;
import com.oceanbase.odc.service.iam.UserService;
import com.oceanbase.odc.service.iam.auth.AuthenticationFacade;
import com.oceanbase.odc.service.iam.model.Organization;
import com.oceanbase.odc.service.iam.model.User;
import com.oceanbase.odc.service.objectstorage.ObjectStorageFacade;
import com.oceanbase.odc.service.quartz.QuartzJobService;
Expand Down Expand Up @@ -394,8 +395,9 @@ private ScheduleChangeLog createScheduleChangelog(ScheduleChangeParams req, Sche
log.info("Create change log success,changLog={}", changeLog);
req.setScheduleChangeLogId(changeLog.getId());
Long approvalFlowInstanceId;
if (organizationService.get(targetSchedule.getId()).isPresent()
&& organizationService.get(targetSchedule.getId()).get().getType() == OrganizationType.INDIVIDUAL) {
Optional<Organization> organization = organizationService.get(targetSchedule.getOrganizationId());
if (organization.isPresent()
&& organization.get().getType() == OrganizationType.INDIVIDUAL) {
approvalFlowInstanceId = null;
} else {
approvalFlowInstanceId = approvalFlowService.create(req);
Expand Down

0 comments on commit e5caabd

Please sign in to comment.