Skip to content

Add compatibility with django-hstore #340

Open
@bufke

Description

@bufke

This project is currently incompatible with django-hstore schema mode. hstore introduces it's own VirtualField. I've demonstrated the issue here.

autocomplete expects ._meta.virtual_fields to contain a fk_field property here. However the hstore VirtualField does not have a fk_field.

for field in meta.model._meta.virtual_fields:
    ...
    required=not meta.model._meta.get_field_by_name(field.fk_field)

A check if hasattr(field, 'fk_field'): fixes the issue and I can't see it causing any harm. Would you consider a pull request to support this? If you feel this is better solved on django-hstore's end please let me know. I'd love to get a fix accepted on one of the projects.

See issue on django-hstore too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions