diff options
Diffstat (limited to 'archaeological_finds/views.py')
| -rw-r--r-- | archaeological_finds/views.py | 33 | 
1 files changed, 11 insertions, 22 deletions
| diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index d980ebd69..8bae9785c 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -317,37 +317,26 @@ class DeleteFindBasketView(IshtarMixin, LoginRequiredMixin, FormView):          form.save()          return HttpResponseRedirect(self.get_success_url()) -"""  treatment_creation_wizard = TreatmentWizard.as_view([      ('basetreatment-treatment_creation', BaseTreatmentForm),      ('selecfind-treatment_creation', UpstreamFindFormSelection), -    ('multiselecfinds-treatment_creation', FindMultipleFormSelection), -    ('container-treatment_creation', ContainerForm),      ('resultfind-treatment_creation', ResultFindForm),      ('resultfinds-treatment_creation', ResultFindFormSet),      ('final-treatment_creation', FinalForm)],      condition_dict={ -        'selecfind-treatment_creation': -            check_treatment('basetreatment-treatment_creation', -                          'treatment_type', not_type_list=['physical_grouping', -                                                           'packaging']), -        'multiselecfinds-treatment_creation': -            check_treatment('basetreatment-treatment_creation', -                            'treatment_type', ['physical_grouping', -                                               'packaging']), -        'resultfinds-treatment_creation': -            check_treatment('basetreatment-treatment_creation', -                            'treatment_type', ['split']), -        'resultfind-treatment_creation': -            check_treatment('basetreatment-treatment_creation', -                            'treatment_type', not_type_list=['split']), -        'container-treatment_creation': -            check_treatment('basetreatment-treatment_creation', -                            'treatment_type', ['packaging']), -    }, +    'selecfind-treatment_creation': +        check_not_exist('basetreatment-treatment_creation', +                        'basket'), +    'resultfinds-treatment_creation': +        check_type_field('basetreatment-treatment_creation', +                         'treatment_type', models.TreatmentType, +                         'downstream_is_many'), +    'resultfind-treatment_creation': +        check_type_field('basetreatment-treatment_creation', +                         'treatment_type', models.TreatmentType, +                         'upstream_is_many')},      label=_(u"New treatment"),      url_name='treatment_creation',) -"""  """  treatment_source_creation_wizard = TreatmentSourceWizard.as_view([ | 
