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 = [])
63
63
*/
64
64
public function exists ()
65
65
{
66
-
67
66
// do the query and check for a 401. The query will error if there are no rows which match the request
68
67
try {
69
68
$ this ->limit (1 )->get ();
@@ -198,7 +197,12 @@ public function createRecord()
198
197
199
198
// we always need to create the record, even if there are no regular or portal fields which have been set
200
199
// 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 ();
202
206
203
207
// Update the model's record ID from the response
204
208
$ recordId = $ response ['response ' ]['recordId ' ];
You can’t perform that action at this time.
0 commit comments