Skip to content

Commit

Permalink
Refactor ScheduledMaintenanceService to require projectId for creatin…
Browse files Browse the repository at this point in the history
…g scheduled maintenance
  • Loading branch information
simlarsen committed Sep 9, 2024
1 parent 505eb26 commit 8e74997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/Server/Services/ScheduledMaintenanceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class Service extends DatabaseService<Model> {
protected override async onBeforeCreate(
createBy: CreateBy<Model>,
): Promise<OnCreate<Model>> {
if (!createBy.props.tenantId) {
if (!createBy.props.tenantId && !createBy.data.projectId) {
throw new BadDataException(
"ProjectId required to create scheduled maintenane.",
);
Expand Down

0 comments on commit 8e74997

Please sign in to comment.