Actually save to DB a created history

This commit is contained in:
Théophile Bastian 2018-02-25 20:00:34 +01:00
parent 8baf408e02
commit e6d587bffd
1 changed files with 5 additions and 0 deletions

View File

@ -195,6 +195,8 @@ def generate_history(user, ts_start):
# let's define a new history object.
history = History(start_ts=ts_start, user=user)
length = HISTORY_MIN + floor(10 * random.weibullvariate(1, 1.5))
history.full_clean()
history.save()
history_line = 0
@ -208,4 +210,7 @@ def generate_history(user, ts_start):
timestamp=timestamp,
history=history
)
new_line.full_clean()
new_line.save()
return history