Fix issues

This commit is contained in:
PCoder 2021-11-10 22:42:40 +05:30
parent b9dcab334b
commit 30b8e6c397

View file

@ -308,10 +308,12 @@ class Command(BaseCommand):
print("Doing an import of all csvs") print("Doing an import of all csvs")
for csv_file_name, model_name in self.csv_files_models_dict.items(): for csv_file_name, model_name in self.csv_files_models_dict.items():
print("Importing %s -- %s" % (csv_file_name, model_name)) print("Importing %s -- %s" % (csv_file_name, model_name))
if model_name in ['Range', 'NamesImport', 'ImportGeom210915', 'Organization', 'AddElevation', models_to_ignore = ['Range', 'NamesImport', 'ImportGeom210915', 'Organization', 'AddElevation',
'GMBA_V2_Centroid', 'Person', 'PeopleRange', 'PeopleFunction', "PeopleResource", 'GMBA_V2_Centroid', 'Person', 'PeopleRange', 'PeopleFunction', "PeopleResource",
"RangeCountry", "RangeNameTranslation", "RangeOnlineInfo", "ResourceRange", "RangeCountry", "RangeNameTranslation", "RangeOnlineInfo", "ResourceRange",
"ResourceKeyword", "Repository"]: "ResourceKeyword", "Repository"]
models_to_ignore = []
if model_name in models_to_ignore:
# we have already imported and do not want to spend more time redoing stuff # we have already imported and do not want to spend more time redoing stuff
continue continue
if csv_folder_path.endswith('/'): if csv_folder_path.endswith('/'):