Commit ca959ab1 by Jonathan Piacenti

Patch for badge migrations to fix date specificity change.

parent 1a6394b7
...@@ -60,7 +60,8 @@ def forwards(apps, schema_editor): ...@@ -60,7 +60,8 @@ def forwards(apps, schema_editor):
assertion.save() assertion.save()
# Would be overwritten by the first save. # Would be overwritten by the first save.
assertion.created = datetime.fromtimestamp( assertion.created = datetime.fromtimestamp(
time.mktime(time.strptime(badge.data['created_at'], "%Y-%m-%dT%H:%M:%S")) # Later versions of badgr include microseconds, but they aren't certain to be there.
time.mktime(time.strptime(badge.data['created_at'].split('.')[0], "%Y-%m-%dT%H:%M:%S"))
) )
assertion.save() assertion.save()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment