@@ -38,7 +38,7 @@ def number(self,n):
3838 return 'interim-%d-%s-%02d' % (self .date .year ,GroupFactory ().acronym ,n )
3939
4040 @factory .post_generation
41- def populate_agenda (self , create , extracted , ** kwargs ):
41+ def populate_agenda (obj , create , extracted , ** kwargs ): # pylint: disable=no-self-argument
4242 '''
4343 Create a default agenda, unless the factory is called
4444 with populate_agenda=False
@@ -47,9 +47,9 @@ def populate_agenda(self, create, extracted, **kwargs):
4747 extracted = True
4848 if create and extracted :
4949 for x in range (3 ):
50- TimeSlotFactory (meeting = self )
51- self .agenda = ScheduleFactory (meeting = self )
52- self .save ()
50+ TimeSlotFactory (meeting = obj )
51+ obj .agenda = ScheduleFactory (meeting = obj )
52+ obj .save ()
5353
5454
5555class SessionFactory (factory .DjangoModelFactory ):
@@ -63,16 +63,16 @@ class Meta:
6363 status_id = 'sched'
6464
6565 @factory .post_generation
66- def add_to_schedule (self , create , extracted , ** kwargs ):
66+ def add_to_schedule (obj , create , extracted , ** kwargs ): # pylint: disable=no-self-argument
6767 '''
6868 Put this session in a timeslot unless the factory is called
6969 with add_to_schedule=False
7070 '''
7171 if extracted is None :
7272 extracted = True
7373 if create and extracted :
74- ts = self .meeting .timeslot_set .all ()
75- self .timeslotassignments .create (timeslot = ts [random .randrange (len (ts ))],schedule = self .meeting .agenda )
74+ ts = obj .meeting .timeslot_set .all ()
75+ obj .timeslotassignments .create (timeslot = ts [random .randrange (len (ts ))],schedule = obj .meeting .agenda )
7676
7777class ScheduleFactory (factory .DjangoModelFactory ):
7878 class Meta :
0 commit comments