migrations: fix migration 35
This commit is contained in:
parent
b9e73fb26e
commit
cf615c7fac
|
@ -12,7 +12,7 @@ class Migration(SchemaMigration):
|
|||
what = (mailbox.owner_id, mailbox.document_id)
|
||||
yield what
|
||||
for deleted_mailbox in orm.DeletedMailbox.objects.all().select_related('mailbox'):
|
||||
what = (deleted_mailbox.mailbox.document_id, deleted_mailbox.deletegate_id)
|
||||
what = (deleted_mailbox.deletegate_id, deleted_mailbox.mailbox.document_id)
|
||||
yield what
|
||||
|
||||
def producer2():
|
||||
|
@ -20,7 +20,7 @@ class Migration(SchemaMigration):
|
|||
if what in seen:
|
||||
continue
|
||||
seen.add(what)
|
||||
yield orm.DeletedDocument(what[1], what[0])
|
||||
yield orm.DeletedDocument(user=what[0], document=what[1])
|
||||
batch = []
|
||||
for deleted_document in producer2():
|
||||
batch.append(deleted_document)
|
||||
|
|
Loading…
Reference in New Issue