Skip to content

Restless doesn't work with nullable foreign keys #29

@karmux

Description

@karmux

I have a Category model with three fields: id, parent and title. Parent can be null.
I set up preparer like this:

preparer = FieldsPreparer(fields={
    'id': 'id',
    'parent': 'parent.id',
    'title': 'title',
})

If I request /api/categories/ I get an error:

'NoneType' object has no attribute 'id'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions