Browse files

append trailing slash if not present when update/create page

  • Loading branch information...
1 parent 815e9e0 commit 74907f3b2d5a115edd417e2083148be5335a902b Sebastian Vetter committed Mar 15, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 oscar/apps/dashboard/pages/forms.py
View
2 oscar/apps/dashboard/pages/forms.py
@@ -33,6 +33,8 @@ def clean_url(self):
Returns cleaned URL or raises an exception.
"""
if 'url' in self.changed_data:
+ if not self.cleaned_data['url'].endswith('/'):
+ self.cleaned_data['url'] += '/'
URLDoesNotExistValidator()(self.cleaned_data['url'])
return self.cleaned_data['url']

0 comments on commit 74907f3

Please sign in to comment.