caljer1 / auto-repair-shop

Automatically exported from code.google.com/p/auto-repair-shop
0 stars 0 forks source link

'None" value showing in Mechanic drop-down menu #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a new work order
2. Save new order order without selecting a mechanic

What is the expected output?
Validation error message for field mechanic displaying  'Select..."

What do you see instead?
Validation error message for field mechanic displaying  'None..."

Please use labels and text to provide additional information.
This bug was introduced yesterday with new code handling the case of former 
mechanic no 
longer in the mechanic list. The problem resides in a test at line 558, but I 
cannot figure out the 
logic. My assumption is that for a new work order __workorder.mechanic is an 
empty string. 

Original issue reported on code.google.com by jerome.c...@gmail.com on 17 Jun 2009 at 7:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If user try to save a work order without selecting a mechanic, my understanding 
is
that the controller is going to 
regenerate the view with the current value at that point. At that point is
_workorder.mechanic equal  
"NO_MECHANIC" or "" or None?
~j

Original comment by jerome.c...@gmail.com on 18 Jun 2009 at 3:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I forgot to cc everybody on this one.

I think I fixed this issue by testing self._workorder.mechanic != None, but I 
didn't figure out yet why the value of 
self._workorder.mechanic is None when in this state.

Original comment by jerome.c...@gmail.com on 18 Jun 2009 at 6:09