mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 21:49:16 +02:00
Implement tag models
This commit is contained in:
parent
c170ee9394
commit
6dde4b73cd
28 changed files with 1034 additions and 141 deletions
|
@ -3,10 +3,10 @@ import random
|
|||
from django.core.exceptions import ValidationError
|
||||
from django.db import connection
|
||||
from rest_framework import serializers
|
||||
from taggit.models import Tag
|
||||
|
||||
from funkwhale_api.moderation import filters as moderation_filters
|
||||
from funkwhale_api.music.models import Artist, Track
|
||||
from funkwhale_api.tags.models import Tag
|
||||
from funkwhale_api.users.models import User
|
||||
|
||||
from . import filters, models
|
||||
|
@ -165,7 +165,7 @@ class TagRadio(RelatedObjectRadio):
|
|||
|
||||
def get_queryset(self, **kwargs):
|
||||
qs = super().get_queryset(**kwargs)
|
||||
return qs.filter(tags__in=[self.session.related_object])
|
||||
return qs.filter(tagged_items__tag=self.session.related_object)
|
||||
|
||||
|
||||
def weighted_choice(choices):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue