mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 03:59:24 +02:00
See #432: added /action endpoint to manage tags in batch
This commit is contained in:
parent
13f36beec3
commit
aaced60ec1
3 changed files with 21 additions and 0 deletions
|
@ -592,3 +592,13 @@ class ManageTagSerializer(ManageBaseAlbumSerializer):
|
|||
|
||||
def get_artists_count(self, obj):
|
||||
return getattr(obj, "_artists_count", None)
|
||||
|
||||
|
||||
class ManageTagActionSerializer(common_serializers.ActionSerializer):
|
||||
actions = [common_serializers.Action("delete", allow_all=False)]
|
||||
filterset_class = filters.ManageTagFilterSet
|
||||
pk_field = "name"
|
||||
|
||||
@transaction.atomic
|
||||
def handle_delete(self, objects):
|
||||
return objects.delete()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue