1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +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 { try {
$attribute = $dbForInternal->createDocument('attributes', new Document([ $attribute = new Document([
'$id' => $collectionId.'_'.$attributeId, '$id' => $collectionId.'_'.$attributeId,
'key' => $attributeId, 'key' => $attributeId,
'collectionId' => $collectionId, 'collectionId' => $collectionId,
@ -92,7 +92,6 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
'formatOptions' => $formatOptions, 'formatOptions' => $formatOptions,
]); ]);
try {
$dbForInternal->checkAttribute($collection, $attribute); $dbForInternal->checkAttribute($collection, $attribute);
$attribute = $dbForInternal->createDocument('attributes', $attribute); $attribute = $dbForInternal->createDocument('attributes', $attribute);
} }

View file

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