summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
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)