mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 03:38:47 +02:00
Fixed problem that no datastructures with an parent element could be created/edited via API
This fixes issue #512. The error was introduced when trying to allow the modification of attachments/parameters throught the parent element. We need a seperate write scope to the element, or we end up with an infinite loop.
This commit is contained in:
parent
fea8109789
commit
3cc1fb40f0
2 changed files with 4 additions and 4 deletions
|
@ -87,7 +87,7 @@ use function sprintf;
|
|||
new Delete(security: 'is_granted("delete", object)'),
|
||||
],
|
||||
normalizationContext: ['groups' => ['parameter:read', 'parameter:read:standalone', 'api:basic:read'], 'openapi_definition_name' => 'Read'],
|
||||
denormalizationContext: ['groups' => ['parameter:write', 'api:basic:write'], 'openapi_definition_name' => 'Write'],
|
||||
denormalizationContext: ['groups' => ['parameter:write', 'parameter:write:standalone', 'api:basic:write'], 'openapi_definition_name' => 'Write'],
|
||||
)]
|
||||
#[ApiFilter(LikeFilter::class, properties: ["name", "symbol", "unit", "group", "value_text"])]
|
||||
#[ApiFilter(DateFilter::class, strategy: DateFilter::EXCLUDE_NULL)]
|
||||
|
@ -161,7 +161,7 @@ abstract class AbstractParameter extends AbstractNamedDBElement
|
|||
*
|
||||
* @var AbstractDBElement|null the element to which this parameter belongs to
|
||||
*/
|
||||
#[Groups(['parameter:read:standalone', 'parameter:write'])]
|
||||
#[Groups(['parameter:read:standalone', 'parameter:write:standalone'])]
|
||||
protected ?AbstractDBElement $element = null;
|
||||
|
||||
public function __construct()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue