See #890: web UI and email notifications on new reports

This commit is contained in:
Eliot Berriot 2019-09-13 06:09:48 +02:00
parent 368b70d3a9
commit c9a9615be8
15 changed files with 292 additions and 4 deletions

View file

@ -14,6 +14,7 @@ from funkwhale_api.music import models as music_models
from funkwhale_api.playlists import models as playlists_models
from . import models
from . import tasks
class FilteredArtistSerializer(serializers.ModelSerializer):
@ -257,4 +258,6 @@ class ReportSerializer(serializers.ModelSerializer):
== settings.FEDERATION_HOSTNAME
)
validated_data["target_owner"] = get_target_owner(validated_data["target"])
return super().create(validated_data)
r = super().create(validated_data)
tasks.signals.report_created.send(sender=None, report=r)
return r