diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-09-16 10:29:22 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:20:58 +0100 |
commit | ec2fc0e18a490634a2da97a16ac94725c3acdc32 (patch) | |
tree | b20ee23a82f76fc63ee99417007d57f310d34ceb /ishtar_common/widgets.py | |
parent | f2f735ed86dd12c37ded45eb0b191b02582c3d08 (diff) | |
download | Ishtar-ec2fc0e18a490634a2da97a16ac94725c3acdc32.tar.bz2 Ishtar-ec2fc0e18a490634a2da97a16ac94725c3acdc32.zip |
Migration to Django 2.2 - fixes
- rel -> remote_field
- to -> model
- default initialization for historical models
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r-- | ishtar_common/widgets.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index e444261d9..ddc4eb913 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -1223,8 +1223,8 @@ class DataTable(Select2Media, forms.RadioSelect): if "." in col_name: keys = col_name.split(".") for key in keys: - if hasattr(field, "rel") and field.rel: - field = field.rel.to + if hasattr(field, "remote_field") and field.remote_field: + field = field.remote_field.model try: field = field._meta.get_field(key) field_verbose_name = field.verbose_name |