.
This commit is contained in:
+6
-1
@@ -343,9 +343,14 @@ class CaseSeriesForm(ModelForm):
|
||||
def __init__(self, *args, user, **kwargs):
|
||||
super(CaseSeriesForm, self).__init__(*args, **kwargs)
|
||||
|
||||
if not user.groups.filter(name="atlas_editor").exists():
|
||||
queryset = Series.objects.filter(author__id=user.id)
|
||||
else:
|
||||
queryset = Series.objects.all()
|
||||
|
||||
self.fields["series"] = ModelChoiceField(
|
||||
required=False,
|
||||
queryset=Series.objects.filter(author__id=user.id),
|
||||
queryset=queryset,
|
||||
# widget=Select(verbose_name="Series", is_stacked=False),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user