Skip to content

Retrieving records via /api/v1/audit/ with a master API key results in error #6583

Open

Description

@sentry

Sentry Issue: FLAGSMITH-API-5GP

TypeError: int() argument must be a string, a bytes-like object or a real number, not 'APIKeyUser'
  File "django/db/models/fields/__init__.py", line 2053, in get_prep_value
    return int(value)

TypeError: Field 'id' expected a number but got <api_keys.user.APIKeyUser object at 0x7f539867a990>.
(19 additional frame(s) were not displayed)
...
  File "audit/views.py", line 56, in get_queryset
    queryset = AuditLog.objects.filter(q).select_related(

Activity

  1. added
    apiIssue related to the REST API
    on Jan 23, 2026
  2. matthewelwell commented on Feb 26, 2026

    @matthewelwell
    Contributor

    Related to #5978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssue related to the REST API

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions