In the save method it was being compensated for in the survey models but the account models didn't have anything in save to fix this. I changed to the preferred django method of using auto_now_add=True on DateTimeField. Below is an example of what is happening and why this is a problem.
import datetime
class Test(object):
field = datetime.datetime.now()
test1 = Test()
test2 = Test()
print test1.field == test2.field
>>> True
datetime.datetime.now() is being evaluated at class definition time, not instantiation, which is causing it to always be the same value. Also patching Ecotrust/solomon but because the save method was compensating in each case, I felt this was higher priority to send a PR for.
In the
save
method it was being compensated for in thesurvey
models but theaccount
models didn't have anything insave
to fix this. I changed to the preferred django method of usingauto_now_add=True
onDateTimeField
. Below is an example of what is happening and why this is a problem.datetime.datetime.now()
is being evaluated at class definition time, not instantiation, which is causing it to always be the same value. Also patching Ecotrust/solomon but because thesave
method was compensating in each case, I felt this was higher priority to send a PR for.