fossy: check UUID format in the URL routing to avoid unhandled exception
Requests like /fossy/xyz123/ were causing an error due to "xyz123" not being a valid UUID. We should just return a 404 in this case, which the URL routing will now do automatically.
This commit is contained in:
		
							parent
							
								
									a557f2b335
								
							
						
					
					
						commit
						bb2eab2968
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -1,8 +1,8 @@ | |||
| from django.conf.urls import url | ||||
| from django.urls import path | ||||
| 
 | ||||
| from .views import CommunityTrackProposalCreateView, CommunityTrackProposalThanksView | ||||
| 
 | ||||
| urlpatterns = [ | ||||
|     url(r'^community-tracks/$', CommunityTrackProposalCreateView.as_view(), name='fossy-add'), | ||||
|     url(r'^(?P<pk>[\w-]+)/$', CommunityTrackProposalThanksView.as_view(), name='fossy-thanks'), | ||||
|     path('community-tracks/', CommunityTrackProposalCreateView.as_view(), name='fossy-add'), | ||||
|     path('<uuid:pk>/', CommunityTrackProposalThanksView.as_view(), name='fossy-thanks'), | ||||
| ] | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue