1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Fix issues from merge

This commit is contained in:
kodumbeats 2021-10-05 09:57:57 -04:00
parent 35c21e31c8
commit 0f5931555a
2 changed files with 4 additions and 5 deletions

View file

@ -77,7 +77,7 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
}
try {
$attribute = $dbForInternal->createDocument('attributes', new Document([
$attribute = new Document([
'$id' => $collectionId.'_'.$attributeId,
'key' => $attributeId,
'collectionId' => $collectionId,
@ -90,9 +90,8 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
'array' => $array,
'format' => $format,
'formatOptions' => $formatOptions,
]);
]);
try {
$dbForInternal->checkAttribute($collection, $attribute);
$attribute = $dbForInternal->createDocument('attributes', $attribute);
}

View file

@ -55,14 +55,14 @@ class Collection extends Model
],
'description' => 'Collection attributes.',
'default' => [],
'example' => new stdClass,
'example' => new \stdClass,
'array' => true,
])
->addRule('indexes', [
'type' => Response::MODEL_INDEX,
'description' => 'Collection indexes.',
'default' => [],
'example' => new stdClass,
'example' => new \stdClass,
'array' => true
])
;