diff --git a/openprescribing/dmd/search.py b/openprescribing/dmd/search.py index 18ca2feef7..dd983cf6ff 100644 --- a/openprescribing/dmd/search.py +++ b/openprescribing/dmd/search.py @@ -68,7 +68,7 @@ def search_by_gtin(q): return [] try: - obj = GTIN.objects.select_related("AMPP").get(gtin=q) + obj = GTIN.objects.select_related("ampp").get(gtin=q) except AMPP.DoesNotExist: return []