Skip to content
Snippets Groups Projects

Resolve "Allow more than one person without e-mail address to be invited"

2 files
+ 2
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 1
1
@@ -1447,7 +1447,7 @@ class InvitePersonByID(PermissionRequiredMixin, SingleObjectMixin, View):
def get(self, request, *args, **kwargs):
person = self.get_object()
if not PersonInvitation.objects.filter(email=person.email).exists():
if not person.email or not PersonInvitation.objects.filter(email=person.email).exists():
length = get_site_preferences()["auth__invite_code_length"]
packet_size = get_site_preferences()["auth__invite_code_packet_size"]
key = generate_random_code(length, packet_size)
Loading