Skip to content

Commit aaee353

Browse files
committed
Copy user table before anything else
- Legacy-Id: 3785
1 parent 010ca93 commit aaee353

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

redesign/importing/import-all.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
# basic dependencies
44
set -e
5+
python import-reused-tables.py base
56
python import-persons.py
67
python import-states.py
78
python import-groups.py
89
python import-roles.py
910

10-
python import-reused-tables.py
11+
python import-reused-tables.py others
1112
python import-meetings.py
1213
python import-announcements.py
1314
python import-docs.py

redesign/importing/import-reused-tables.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@
2222
from ietf.submit.models import IdSubmissionStatus, IdSubmissionDetail, IdApprovedDetail, TempIdAuthors
2323
from django.contrib.auth.models import User
2424

25-
models_to_copy = [Redirect, Suffix, Command,
26-
TelechatAgendaItem, WGAction,
27-
IprSelecttype, IprLicensing, IprDetail, IprContact, IprNotification, IprUpdate,
28-
IdSubmissionStatus, IdSubmissionDetail, IdApprovedDetail, TempIdAuthors,
29-
User]
25+
known_models = {
26+
'base': [User],
27+
'others': [Redirect, Suffix, Command,
28+
TelechatAgendaItem, WGAction,
29+
IprSelecttype, IprLicensing, IprDetail, IprContact, IprNotification, IprUpdate,
30+
IdSubmissionStatus, IdSubmissionDetail, IdApprovedDetail, TempIdAuthors]
31+
}
32+
33+
models_to_copy = known_models[sys.argv[1]]
3034

3135
def queryset_chunks(q, n):
3236
"""Split queryset q up in chunks of max size n."""

0 commit comments

Comments
 (0)