-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
I have a model field as follows;
class Tag(models.Model):
TAG_USER_GROUP_NAME = "X_TEAM"
def limit_user_selection_to_group_user(group_name):
result = dict(groups__name=group_name, is_active=True)
return result
checked_by = models.ForeignKey(
settings.AUTH_USER_MODEL,
verbose_name="Checked",
limit_choices_to=limit_user_selection_to_group_user(TAG_USER_GROUP_NAME),
blank=True, null=True,
related_name='tagtracking_tags_checked',
on_delete=models.SET_NULL
)
Datatable setup as follows:
class TagDatatable(Datatable):
...
checked_by = columns.TextColumn(
sources=['checked_by__username'], processor=helpers.make_xeditable
)
Issue is datatable validates input according to the limit_choices_to function correctly but It does not limit choices according to the rule, it shows all the choices but allows only validated ones to save.
Metadata
Metadata
Assignees
Labels
No labels