Fix issues from merge
This commit is contained in:
parent
35c21e31c8
commit
0f5931555a
2 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
])
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue