From ab1f6d5016175a1990892f1ea7408dfe495de103 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 11 Jun 2018 18:26:05 +0200 Subject: Imports: catch configuration error - add configuration for WarehouseDivisionLink --- ishtar_common/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index c25cdf605..983ec5830 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -410,9 +410,10 @@ def get_field_labels_from_path(model, path): try: field = model._meta.get_field(key) except: - return labels + labels.append(key) + continue if hasattr(field, 'verbose_name'): labels.append(field.verbose_name) - if field.one_to_many or field.one_to_one or field.many_to_many: - model = field.model + else: + labels.append(key) return labels -- cgit v1.2.3