Open BrianPainter opened 8 years ago
@BrianPainter What is supposed to be the default value of window_number?
I found another window_number
variable defined in pis/views.py
, where
data = request.data
window_number = data.get('window')
But I'm supposing that's not the case here?
@janga1997 The window_number should be a user defined field on the Window model to make for easy labeling/identification of the windows. In the above code, the window_number is referencing the id number from the window model. This works, but ends up not matching the numbers that we would prefer to use for the windows if any changes are made to the database (Delete a window object, and now that id number is not re-used). Does that make sense?
The window model needs a window_number field