Skip to content

Commit

Permalink
Resolves #827
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Feb 13, 2024
1 parent 4a9c323 commit 1e994cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alyx/actions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def is_water_restricted(self, obj):
class WeighingForm(BaseActionForm):
def __init__(self, *args, **kwargs):
super(WeighingForm, self).__init__(*args, **kwargs)
self.fields['subject'].queryset = self.current_user.get_allowed_subjects()
if 'subject' in self.fields:
self.fields['subject'].queryset = self.current_user.get_allowed_subjects()
if self.fields.keys():
self.fields['weight'].widget.attrs.update({'autofocus': 'autofocus'})

Expand Down

0 comments on commit 1e994cf

Please sign in to comment.