diff options
author | Cefin <kevon@tuta.io> | 2021-11-09 12:37:30 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-22 00:03:21 +0100 |
commit | 0d992b62662d28637a61a0b114eb85cd6e694dbc (patch) | |
tree | 7159258b95df3a9399d685134da453939c0bda7d /archaeological_finds/views.py | |
parent | da3d81cfdf55d69aef32b84e5c57ce4b0729c66c (diff) | |
download | Ishtar-0d992b62662d28637a61a0b114eb85cd6e694dbc.tar.bz2 Ishtar-0d992b62662d28637a61a0b114eb85cd6e694dbc.zip |
rapid action context record show add a find #5184 part one
Diffstat (limited to 'archaeological_finds/views.py')
-rw-r--r-- | archaeological_finds/views.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index 7dae92827..870746612 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -354,6 +354,26 @@ find_creation_wizard = wizards.FindWizard.as_view( url_name="find_creation", ) + +def find_create(request, pk): + find = wizard_is_available( + find_creation_wizard, + request, + models.Find, + pk + ) + if not find: + return HttpResponseRedirect("/") + find_add_wizard(request) + if get_current_profile().contextrecord: + key = "selecrecord-find_creation" + wizards.FindWizard.session_set_value(request, key, "pk", pk, reset=True) + + step = "find-find_creation" + + return redirect(reverse("find-creation", kwargs={"step": step})) + + find_search_condition_dict = { "general-find_search": check_not_warehouse_module, "generalwarehouse-find_search": check_warehouse_module, |