mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user