Open
Description
Checklist
- This issue is not about installing previous versions of django-smart-selects older than 1.2.8. I understand that previous versions are insecure and will not receive any support whatsoever.
- I have verified that that issue exists against the
master
branch of django-smart-selects. - I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- I have debugged the issue to the
smart_selects
app. - I have reduced the issue to the simplest possible case.
- I have included all relevant sections of
models.py
,forms.py
, andviews.py
with problems. - I have used GitHub Flavored Markdown to style all of my posted code.
Steps to reproduce
class Service(models.Model):
...
class ServiceOption(models.Model):
service = models.ForeignKey(
Service,
on_delete=models.PROTECT,
related_name="options",
verbose_name=_("Service"),
)
class PartnerService(models.Model):
service = models.ForeignKey(
Service,
on_delete=models.PROTECT,
related_name="partners",
verbose_name=_("Service"),
)
class PartnerServiceOption(models.Model):
service = models.ForeignKey(
PartnerService,
on_delete=models.PROTECT,
related_name="options",
verbose_name=_("Service"),
)
option = ChainedForeignKey(
ServiceOption,
chained_field="service__service",
chained_model_field="service",
auto_choose=True,
on_delete=models.PROTECT,
related_name="partners",
verbose_name=_("Service Option"),
)
Actual behavior
I end up with no results
Expected behavior
Should return selected_service.options.all()
Metadata
Metadata
Assignees
Labels
No labels