fix error in handling proxy model
@@ -78,7 +78,12 @@ class Command(BaseCommand):
opts = translator.get_options_for_model(model)
for field_name, fields in opts.local_fields.items():
# Take `db_column` attribute into account
+ try:
field = list(fields)[0]
+ except IndexError:
+ # Ignore IndexError for ProxyModel
+ # maybe there is better way to handle this
+ continue
column_name = field.db_column if field.db_column else field_name
missing_langs = list(self.get_missing_languages(column_name, db_table))
if missing_langs:
