summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-16 18:16:26 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-16 18:16:26 +0200
commit960ab12d2d8b58003190e8d7fe0e46b525a00a37 (patch)
tree7eda2b86e94ee3abc32a685186ef08678a513d49 /ishtar_common
parent932df423de39c878111fd7afae0be153910062bb (diff)
downloadIshtar-960ab12d2d8b58003190e8d7fe0e46b525a00a37.tar.bz2
Ishtar-960ab12d2d8b58003190e8d7fe0e46b525a00a37.zip
Author: fix get by natural key
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index c9fc8eec4..5c2875fc5 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3331,12 +3331,12 @@ class AuthorManager(models.Manager):
def get_by_natural_key(
self, name, surname, attached_to_name,
attached_to_organization_type, author_type):
- q = {"name": name, "surname": surname,
+ q = {"person__name": name, "person__surname": surname,
"author_type__txt_idx": author_type}
if attached_to_name:
- q['attached_to__name'] = attached_to_name
+ q['person__attached_to__name'] = attached_to_name
if attached_to_organization_type:
- q['attached_to__organization_type__txt_idx'] = \
+ q['person__attached_to__organization_type__txt_idx'] = \
attached_to_organization_type
return self.get(**q)