File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ public function setModel($model, $ids = [])
6363 */
6464 public function exists ()
6565 {
66-
6766 // do the query and check for a 401. The query will error if there are no rows which match the request
6867 try {
6968 $ this ->limit (1 )->get ();
@@ -198,7 +197,12 @@ public function createRecord()
198197
199198 // we always need to create the record, even if there are no regular or portal fields which have been set
200199 // forward this request to a base query builder to execute the create record request
201- $ response = $ this ->query ->fieldData ($ fieldsToWrite ->toArray ())->portalData ($ model ->portalData )->createRecord ();
200+ $ request = $ this ->query ->fieldData ($ fieldsToWrite ->toArray ());
201+ if ($ model ->portalData ) {
202+ $ request ->portalData ($ model ->portalData );
203+ }
204+
205+ $ response = $ request ->createRecord ();
202206
203207 // Update the model's record ID from the response
204208 $ recordId = $ response ['response ' ]['recordId ' ];
You can’t perform that action at this time.
0 commit comments