mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 07:29:24 +02:00
See #890: expose number of reports linked to tracks, albums, libraries, accounts and artists via the /stats route
This commit is contained in:
parent
d4deb830c0
commit
9552b49a46
12 changed files with 73 additions and 2 deletions
|
@ -10,6 +10,7 @@ from django.dispatch import receiver
|
|||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
||||
from funkwhale_api.common import models as common_models
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
|
@ -152,6 +153,8 @@ class Report(federation_models.FederationMixin):
|
|||
"Note", content_type_field="target_content_type", object_id_field="target_id"
|
||||
)
|
||||
|
||||
objects = common_models.GenericTargetQuerySet.as_manager()
|
||||
|
||||
def get_federation_id(self):
|
||||
if self.fid:
|
||||
return self.fid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue