Fixed a type issue with [14556]
- Legacy-Id: 14559
Note: SVN reference [14556] has been migrated to Git commit a438ff85e8
This commit is contained in:
parent
261ebbf44e
commit
ccec044511
|
@ -47,8 +47,9 @@ class MeetingFactory(factory.DjangoModelFactory):
|
||||||
@factory.lazy_attribute
|
@factory.lazy_attribute
|
||||||
def date(self):
|
def date(self):
|
||||||
if self.type_id == 'ietf':
|
if self.type_id == 'ietf':
|
||||||
year = (self.number-2)//3+1985
|
num = int(self.number)
|
||||||
month = ((self.number-2)%3+1)*4-1
|
year = (num-2)//3+1985
|
||||||
|
month = ((num-2)%3+1)*4-1
|
||||||
day = random.randint(1,28)
|
day = random.randint(1,28)
|
||||||
return datetime.date(year, month, day)
|
return datetime.date(year, month, day)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue