# HG changeset patch # User Ludovic Chabant # Date 1436243224 25200 # Node ID a17774094db871fad8e26b1791fdc3f339300274 # Parent aefe70229fddc13231ef8e810c16d747f84e919b serve: Fix bug with creating routing metadata from the URL. This is still using the hack for year/month/day values :( diff -r aefe70229fdd -r a17774094db8 piecrust/routing.py --- a/piecrust/routing.py Sun Jul 05 00:09:41 2015 -0700 +++ b/piecrust/routing.py Mon Jul 06 21:27:04 2015 -0700 @@ -132,6 +132,11 @@ for k in missing_keys: route_metadata[k] = '' + # TODO: fix this hard-coded shit + for key in ['year', 'month', 'day']: + if key in route_metadata and isinstance(route_metadata[key], str): + route_metadata[key] = int(route_metadata[key]) + return route_metadata def getUri(self, route_metadata, *, sub_num=1):