Open laureD19 opened 6 months ago
Indeed, very strange: the actor 2196 on production is not connected to an active item based on the database. We need to find out, what prevents the deletion of it. Maybe there is a draft connected to the actor? Will do further research.
just checked again, and still running into the same issue. I found work-arounds (not ideal) to get rid of annoying actors I wanted to delete. But I still run into a 400 with, for example, on production:
DELETE
/api/actors/2890notify also @mkrzmr
when trying to delete actor 2890: get "Cannot delete actors that are contributors of items!" try again with admin account and force = True, but still fails search for all items by 2890 including drafts = lots of results
I know a workaround would be to edit all items, remove 2890 and then delete the actor. But I wonder why force=True with admin account does not delete the actor
Indeed, very strange: the actor 2196 on production is not connected to an active item based on the database. We need to find out, what prevents the deletion of it. Maybe there is a draft connected to the actor? Will do further research.
I used {{ _.host }}/api/actors/2196 with items=true and got some results. The items seem to be drafts? I could not find them through item-search
Edit: Looks like these items are old versions
deletion also needed for:
It's the same with these actors. If you use /api/actors/2196 with items=true you see they are connected to items (I suppose old versions) that do not seem to be affected by a force delete
Yes, it is the same. Maybe Tomasz can include the exclusion of drafts cases in the force parameter??
Then, I also get another situation. When trying to delete, I get the following error code "error": "Cannot delete actors that are affiliations of other actors!"
, although I can't see any affiliations when looking for them.
Then, I also get another situation. When trying to delete, I get the following error code
"error": "Cannot delete actors that are affiliations of other actors!"
, although I can't see any affiliations when looking for them.
Indeed, all of the eight mentions actors are affiliations of other actors. I can see this in the database but I'm not sure if we are able to see it by using API calls.
I don't find an API call to identify if an actor is an affiliation of other actors - so we currently don't have a single API call to identify which actors belong to an affiliation actor id. This is relevant because for deleting the actor who is an affiliation of other actors these affiliations to the other actors must be deleted beforehand. I now see two options:
I guess, we like to go with (1) - what do you think @laureD19 @mkrzmr - if we agree we can create an issue for backend.
The reason why some actors can't be deleted are described here: https://github.com/SSHOC/sshoc-marketplace-backend/issues/468
Currently actors attached to items can't be deleted, even when setting the force parameter to
true
. DELETE /api/actors{id} returns a 400 with"error": "Cannot delete actors that are contributors of active items!"
List here actors that should nonetheless be deleted: