Skip to content

CustomFieldAdmin breaks if object_id is not integer #9

Open
@hherglotz

Description

@hherglotz

Hi,

Great project, I was looking for something like this.

Followed the steps in the Readme, however, it would break my admin view.

I debugged and found the problem:

Since Django 1.8 ids of models can be UUID, which is what I am using in my models.

This does not work with line 105 in models.py:

object_id = models.PositiveIntegerField()

Do you have any idea how this could be made agnostic to the type of the id of a model?

(I could switch to int for my ids and add another property with uuid, but others that used models with mixed id types would still run in the same issue).

Thanks for the great work!

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