List(type=Enum(...)) not supported

Bug #136806 reported by Marc Tardif on 2007-09-02
2
Affects Status Importance Assigned to Milestone
Storm
Undecided
James Henstridge

Bug Description

When attempting to set a variable of the following type:

  List(type=Enum(map={"a": 1}))

The attached error is returned. The problem seems to be in the set() method of the Variable base class:

                new_value = self._parse_set(value, from_db)
                if from_db:
                    # Prepare it for being used by the hook below.
                    value = self._parse_get(new_value, False)

So, if from_db is set, the the _parse_set method of the EnumVariable class will return "a" for "a". However, since from_db is set, then the same "a" value will be passed to the _parse_get method which will not be found in the _get_map dictionary.

Related branches

Marc Tardif (cr3) wrote :
Changed in storm:
assignee: nobody → jamesh
status: New → In Progress
James Henstridge (jamesh) wrote :

Fix merged to trunk in r301.

Changed in storm:
status: In Progress → Fix Committed
Changed in storm:
milestone: none → 0.15
Jamu Kakar (jkakar) on 2009-08-08
Changed in storm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers