We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d91b5cd commit dad3f34Copy full SHA for dad3f34
force-app/main/default/classes/CourseRegistrationHelper.cls
@@ -77,14 +77,13 @@ public class CourseRegistrationHelper {
77
return;
78
}
79
80
- Map<Id, Course__c> coursesWithCapacity = new Map<Id, Course__c>();
81
- for (Course__c course : [
82
- SELECT Id, MaxNumberOfParticipants__c, RegistrationSignupsCount__c
83
- FROM Course__c
84
- WHERE Id IN :courseIds
85
- ]) {
86
- coursesWithCapacity.put(course.Id, course);
87
- }
+ Map<Id, Course__c> coursesWithCapacity = new Map<Id, Course__c>(
+ [
+ SELECT Id, MaxNumberOfParticipants__c, RegistrationSignupsCount__c
+ FROM Course__c
+ WHERE Id IN :courseIds
+ ]
+ );
88
89
for (Id courseId : courseIds) {
90
Course__c relatedCourse = coursesWithCapacity.get(courseId);
0 commit comments