Skip to content
Snippets Groups Projects
Commit 0c27ab1f authored by git's avatar git Committed by Aaron Bauman
Browse files

Issue #3018788 by dkosbob: fix logic in getRecordTypeIdByDeveloperName()

parent 37dd412f
No related branches found
No related tags found
No related merge requests found
...@@ -823,10 +823,10 @@ class RestClient implements RestClientInterface { ...@@ -823,10 +823,10 @@ class RestClient implements RestClientInterface {
*/ */
public function getRecordTypeIdByDeveloperName($name, $devname, $reset = FALSE) { public function getRecordTypeIdByDeveloperName($name, $devname, $reset = FALSE) {
$record_types = $this->getRecordTypes($name, $reset); $record_types = $this->getRecordTypes($name, $reset);
if (empty($record_types[$name][$devname])) { if (empty($record_types[$devname])) {
throw new \Exception("No record type $devname for $name"); throw new \Exception("No record type $devname for $name");
} }
return $record_types[$name][$devname]->id(); return $record_types[$devname]->id();
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment