Open mandrej opened 8 years ago
If I had to venture a guess it's this conditional in the decompress
which is seeing the 0
and not populating the value: https://github.com/mlavin/django-selectable/blob/master/selectable/forms/widgets.py#L70
Thank you for your help. I changed:
/selectable/forms/widgets.py
def decompress(self, value): if value is not None: ...
and:
/selectable/base.py
class ModelLookup(LookupBase): def get_item(self, value): item = None if value is not None: ...
On Wed, May 18, 2016 at 2:45 PM, Mark Lavin notifications@github.com wrote:
If I had to venture a guess it's this conditional in the decompress which is seeing the 0 and not populating the value: https://github.com/mlavin/django-selectable/blob/master/selectable/forms/widgets.py#L70
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/mlavin/django-selectable/issues/166#issuecomment-220014748
I am using AutoCompleteSelectWidget and it's working fine. Problem is when I have id = 0 (legacy data base), widget doesn't populate this field and matching field is empty string. Autosugest is working. Please help