geometry url when editing a space should be the space
This commit is contained in:
parent
6125ea6d65
commit
1a4d18ae37
1 changed files with 5 additions and 1 deletions
|
@ -180,6 +180,10 @@ def edit(request, pk=None, model=None, level=None, space=None, on_top_of=None, e
|
||||||
if new and not edit_utils.can_create:
|
if new and not edit_utils.can_create:
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|
||||||
|
geometry_url = edit_utils.geometry_url
|
||||||
|
if model.__name__ == 'Space':
|
||||||
|
geometry_url = SpaceChildEditUtils(space, request).geometry_url
|
||||||
|
|
||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
ctx = {
|
ctx = {
|
||||||
'path': request.path,
|
'path': request.path,
|
||||||
|
@ -189,7 +193,7 @@ def edit(request, pk=None, model=None, level=None, space=None, on_top_of=None, e
|
||||||
'can_edit': can_edit,
|
'can_edit': can_edit,
|
||||||
'new': new,
|
'new': new,
|
||||||
'title': obj.title if obj else None,
|
'title': obj.title if obj else None,
|
||||||
'geometry_url': edit_utils.geometry_url,
|
'geometry_url': geometry_url,
|
||||||
}
|
}
|
||||||
|
|
||||||
with suppress(FieldDoesNotExist):
|
with suppress(FieldDoesNotExist):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue