diff --git a/invitations/managers.py b/invitations/managers.py index 84cff9b31c325853e9d784a9c2bb17de288e8565..d074c898fd35b507d2aefed5e74c853a08c05ec7 100644 --- a/invitations/managers.py +++ b/invitations/managers.py @@ -33,6 +33,9 @@ class RegistrationInvitationQuerySet(models.QuerySet): def invited_by(self, user): return self.filter(invited_by=user) + def created_by(self, user): + return self.filter(created_by=user) + class CitationNotificationQuerySet(models.QuerySet): def for_submissions(self): diff --git a/invitations/views.py b/invitations/views.py index 6525ca66b14dd1e94c610f0a8030061c1af9d994..05d613180a27874e70cf58c985a38020e0d20a9c 100644 --- a/invitations/views.py +++ b/invitations/views.py @@ -142,7 +142,7 @@ class RegistrationInvitationsUpdateView(RequestArgumentMixin, PermissionsMixin, if not self.request.user.has_perm('scipost.can_invite_fellows'): qs = qs.not_for_fellows() if not self.request.user.has_perm('scipost.can_manage_registration_invitations'): - qs = qs.invited_by(self.request.user) + qs = qs.created_by(self.request.user) return qs