Skip to content

Commit

Permalink
Send map widget GET request to info-search view
Browse files Browse the repository at this point in the history
Seemed like the form sent a request to home (/) directly,
when it probably should have been sent to /search/ instead.
This at least makes it so if you search for a room and it finds
a match it opens the page for the room,
and if there is no match then it still shows the search page but
with the message that nothing was found.

If this is how the map widget is supposed to function is
uncertain to me, I dont actually know how it originally worked
before it broke (if it ever worked)
  • Loading branch information
stveit committed Feb 6, 2025
1 parent 12f00d5 commit b47b2db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/3207.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed search function for room map widget not working
2 changes: 1 addition & 1 deletion python/nav/web/navlets/room_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get(self, request, *args, **kwargs):
context['can_edit_rooms'] = request.account.has_perm(
'web_access', reverse('seeddb-room-edit')
)
context['searchform'] = SearchForm()
context['searchform'] = SearchForm(form_action='info-search')
return self.render_to_response(context)

def get_template_basename(self):
Expand Down

0 comments on commit b47b2db

Please sign in to comment.