diff --git a/apps/activity/templates/activity/activity_entry.html b/apps/activity/templates/activity/activity_entry.html
index 806b486e5693ed4eabb70c8e2ce763129097d2dc..e4bd44168a2cf55d1876ea1e7c39aed4fc7384ef 100644
--- a/apps/activity/templates/activity/activity_entry.html
+++ b/apps/activity/templates/activity/activity_entry.html
@@ -130,19 +130,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
                         $.post("/api/note/transaction/transaction/", {
                             "csrfmiddlewaretoken": CSRF_TOKEN,
                             "quantity": 1,
-                            "amount": {
-                                {
-                                    activity.activity_type.guest_entry_fee
-                                }
-                            },
+                            "amount": {{ activity.activity_type.guest_entry_fee }},
                             "reason": "Crédit " + credit_name +
                                 " (invitation {{ activity.name }})",
                             "valid": true,
-                            "polymorphic_ctype": {
-                                {
-                                    notespecial_ctype
-                                }
-                            },
+                            "polymorphic_ctype": {{ notespecial_ctype }},
                             "resourcetype": "SpecialTransaction",
                             "source": credit_id,
                             "destination": target.attr('data-inviter'),
diff --git a/apps/activity/views.py b/apps/activity/views.py
index bd3d651b3300087e0c24199002257f5fc7e1e0a0..97ae13757c4b0c1d93c1fd3d65bfa79df333e897 100644
--- a/apps/activity/views.py
+++ b/apps/activity/views.py
@@ -139,6 +139,7 @@ class ActivityInviteView(ProtectQuerysetMixin, ProtectedCreateView):
         form = super().get_form(form_class)
         form.activity = Activity.objects.filter(PermissionBackend.filter_queryset(self.request.user, Activity, "view"))\
             .get(pk=self.kwargs["pk"])
+        form.fields["inviter"].initial = self.request.user.note
         return form
 
     def form_valid(self, form):
@@ -196,7 +197,6 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView):
                 | Q(inviter__alias__normalized_name__regex=Alias.normalize(pattern))
             )
         else:
-            pattern = None
             guest_qs = guest_qs.none()
         return guest_qs
 
@@ -224,7 +224,8 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView):
         # Filter with permission backend
         note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request.user, Alias, "view"))
 
-        if pattern:
+        if "search" in self.request.GET and self.request.GET["search"]:
+            pattern = self.request.GET["search"]
             note_qs = note_qs.filter(
                 Q(note__noteuser__user__first_name__regex=pattern)
                 | Q(note__noteuser__user__last_name__regex=pattern)
@@ -234,7 +235,7 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView):
         else:
             note_qs = note_qs.none()
 
-        if settings.DATABASES[note_qs.db]["ENGINE"] == 'django.db.backends.postgresql_psycopg2':
+        if settings.DATABASES[note_qs.db]["ENGINE"] == 'django.db.backends.postgresql':
             note_qs = note_qs.distinct('note__pk')[:20]
         else:
             # SQLite doesn't support distinct fields. For compatibility reason (in dev mode), the note list will only
@@ -253,13 +254,13 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView):
             .distinct().get(pk=self.kwargs["pk"])
         context["activity"] = activity
 
-        matched=[]
+        matched = []
 
-        for guest in get_invited_guest(self,activity):
+        for guest in self.get_invited_guest(activity):
             guest.type = "Invité"
             matched.append(guest)
 
-        for note in get_invited_note(self,activity):
+        for note in self.get_invited_note(activity):
             note.type = "Adhérent"
             note.activity = activity
             matched.append(note)