Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pgajek2 committed Sep 26, 2023
1 parent 68ebda5 commit d5ac02a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions force-app/main/default/classes/SOQL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public virtual inherited sharing class SOQL implements Queryable {
Map<String, SObject> cutomKeyToRecord = (Map<String, SObject>) Type.forName('Map<String, ' + ofObject + ' >').newInstance();

for (SObject record : toList()) {
cutomKeyToRecord.put(record.get(keyField) + '', record);
cutomKeyToRecord.put(String.valueOf(record.get(keyField)), record);
}

return cutomKeyToRecord;
Expand All @@ -594,7 +594,7 @@ public virtual inherited sharing class SOQL implements Queryable {
Map<String, List<SObject>> cutomKeyToRecords = (Map<String, List<SObject>>) Type.forName('Map<String, List<' + ofObject + ' >>').newInstance();

for (SObject record : toList()) {
String customKey = record.get(keyField) + '';
String customKey = String.valueOf(record.get(keyField));

if (!cutomKeyToRecords.containsKey(customKey)) {
cutomKeyToRecords.put(customKey, new List<SObject>());
Expand Down

0 comments on commit d5ac02a

Please sign in to comment.