Commits

Andriy Kornatskyy  committed f2e0388

Check kwargs before merging with route_args in path_for.

  • Participants
  • Parent commits 708f856

Comments (0)

Files changed (1)

File src/wheezy/web/handlers/base.py

     # region: routing
 
     def path_for(self, name, **kwargs):
-        return self.request.root_path + self.options['path_for'](
-            name, **dict(self.route_args, **kwargs))
+        if kwargs:
+            return self.request.root_path + self.options['path_for'](
+                name, **dict(self.route_args, **kwargs))
+        else:
+            return self.request.root_path + self.options['path_for'](
+                name, **self.route_args)
 
     def absolute_url_for(self, name, **kwargs):
         parts = self.request.urlparts