mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 21:59:16 +02:00
Attribute artist
This commit is contained in:
parent
8687a64873
commit
4e44e4e4b6
31 changed files with 1741 additions and 46 deletions
|
@ -75,6 +75,15 @@ class DomainFactory(NoUpdateOnCreate, factory.django.DjangoModelFactory):
|
|||
model = "federation.Domain"
|
||||
django_get_or_create = ("name",)
|
||||
|
||||
@factory.post_generation
|
||||
def with_service_actor(self, create, extracted, **kwargs):
|
||||
if not create or not extracted:
|
||||
return
|
||||
|
||||
self.service_actor = ActorFactory(domain=self)
|
||||
self.save(update_fields=["service_actor"])
|
||||
return self.service_actor
|
||||
|
||||
|
||||
@registry.register
|
||||
class ActorFactory(NoUpdateOnCreate, factory.DjangoModelFactory):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue