fix mark attach
This commit is contained in:
parent
21b0135c68
commit
2fd38df59b
@ -228,6 +228,11 @@ class MarkController extends ApiController
|
||||
throw new NotFoundHttpException('Mark not found');
|
||||
}
|
||||
|
||||
$markEntity = MarkEntity::findOne(['mark_id' => $request['mark_id'], 'entity_type' => $request['entity_type'], 'entity_id' => $request['entity_id']]);
|
||||
if ($markEntity) {
|
||||
throw new ServerErrorHttpException('Mark is already attached');
|
||||
}
|
||||
|
||||
$markEntity = new MarkEntity();
|
||||
$markEntity->load($request, '');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user