Merge pull request #124 from benkonrath/fix-admin-500-error
Don't remove '/' from id when it's not in the pathfix_request_path_info
commit
9efc5cfcb2
|
|
@ -323,6 +323,9 @@ class PolymorphicParentModelAdmin(admin.ModelAdmin):
|
|||
# See if the path started with an ID.
|
||||
try:
|
||||
pos = path.find('/')
|
||||
if pos == -1:
|
||||
object_id = long(path)
|
||||
else:
|
||||
object_id = long(path[0:pos])
|
||||
except ValueError:
|
||||
raise Http404("No ct_id parameter, unable to find admin subclass for path '{0}'.".format(path))
|
||||
|
|
|
|||
Loading…
Reference in New Issue