Access the UserProfile's new email field rather than using User.

This is preparatory for stopping using the User model.

(imported from commit a1b0808c8cc2ddd19a25163f91c4f18620c9ce90)
This commit is contained in:
Tim Abbott
2013-03-28 15:43:34 -04:00
parent 3a35c5b00c
commit 1443edce00
25 changed files with 94 additions and 94 deletions

View File

@@ -7,13 +7,13 @@ import simplejson
def dump():
pointers = []
for u in UserProfile.objects.select_related("user__email").all():
for u in UserProfile.objects.all():
pointer = u.pointer
if pointer != -1:
pub_date = Message.objects.get(id=pointer).pub_date
pointers.append((u.user.email, datetime_to_timestamp(pub_date)))
pointers.append((u.email, datetime_to_timestamp(pub_date)))
else:
pointers.append((u.user.email, -1))
pointers.append((u.email, -1))
file("dumped-pointers", "w").write(simplejson.dumps(pointers) + "\n")
def restore(change):