feat: auto-populate department_id on create + seed default campus with backfill
This commit is contained in:
@@ -118,7 +118,9 @@ export class ClassroomRentalsService {
|
||||
})),
|
||||
});
|
||||
}
|
||||
return this.repo.save(this.repo.create({ ...dto, createdBy: userId, status: 'active' }));
|
||||
const rental = this.repo.create({ ...dto, createdBy: userId, status: 'active' });
|
||||
rental.departmentId = classroom.departmentId;
|
||||
return this.repo.save(rental);
|
||||
}
|
||||
|
||||
async update(id: number, dto: UpdateRentalDto) {
|
||||
|
||||
Reference in New Issue
Block a user