Skip to content

IPSTore datattable view error. #136

@debuggerpk

Description

@debuggerpk

MultipleObjectsReturned: get() returned more than one IPStore -- it returned 2!

Issue is probably at

        try:
            ipstore = IPStore.objects.get(ip=ip)
        except:
            queryset = IPStore.objects.filter(
                geocoded_postal_code=postcode,
                census__isnull=False
            )
            if queryset.count():
                ipstore = queryset[0]
            else:
                ipstore = None

        if ipstore:
            census = ipstore.census

        return census

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions