Project

General

Profile

Tâche #10278

Distribution EOLE - Scénario #10150: Assistance aux utilisateurs (2-4)

Gérer le cas où la cible d'un "calc_multi_val" n'est pas une variable multivaluée

Added by Joël Cuissinat about 6 years ago. Updated about 6 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
01/20/2015
Due date:
% Done:

50%

Estimated time:
1.00 h
Spent time:
Remaining (hours):
0.0

Description

Avec le dictionnaire joint, si on va sur la famille "test", le message obtenu n'est pas explicite :

Erreur - 500 - INTERNAL SERVER ERROR
'list' object has no attribute 'split'

Le traceback complet est :
2015-01-20 10:07:14,442: eolegenconfig - 'list' object has no attribute 'split'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 114, in tags
    return make_json_response(lib.get_tags(lib.get_id(), category_name))
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 595, in get_tags
    tag, variable = get_variable(id_, category_name, name, current_tag=old_tag)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 507, in get_variable
    variable = _get_variable(option, type_, vname, category_name, current_tag)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 419, in _get_variable
    value = config._getattr(path, force_permissive=force_permissive)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 223, in _getattr
    return self.getattr(name, force_permissive, force_properties, validate)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 241, in getattr
    validate=validate)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 267, in getattr
    force_permissives=force_permissives)
  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 183, in getitem
    force_permissives)
  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 254, in _getitem
    opt.impl_validate(value, context, 'validator' in setting)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 481, in impl_validate
    do_validation(value, force_index)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 432, in do_validation
    self._validate(_value)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 1134, in _validate
    splitted = value.split('@', 1)
AttributeError: 'list' object has no attribute 'split'

99_multival.xml View (879 Bytes) Joël Cuissinat, 01/20/2015 10:14 AM


Related issues

Related to Tiramisu - Tâche #10311: Un test unitaire Tiramisu est en erreur Fermé 12/02/2015

History

#2 Updated by Joël Cuissinat about 6 years ago

  • Tracker changed from Anomalie to Tâche
  • Status changed from Nouveau to En cours
  • Assigned To set to Emmanuel GARETTE
  • % Done changed from 0 to 50
  • Estimated time set to 1.00 h
  • Parent task set to #10150
  • Remaining (hours) set to 0.5

#3 Updated by Joël Cuissinat about 6 years ago

Résolu par commit tiramisu:cf1f3daa

Cependant, cette modification semble avoir cassé l'un des tests unitaires :

../usr/share/tiramisu/tests/test_config_domain.py .F......

#4 Updated by Emmanuel GARETTE about 6 years ago

  • Status changed from En cours to Fermé
  • Remaining (hours) changed from 0.5 to 0.0

Also available in: Atom PDF