If a new state is created where newstate.previous == Null then the query for get_first_state returns two states, breaking Querysets that are looking for objects whose State is Active. Since the fixture linked below clearly states that the initial Active state has id=1, let's use that to identify the initial state.
Background:
If a new state is created where
newstate.previous == Null
then the query for get_first_state returns two states, breaking Querysets that are looking for objects whose State isActive
. Since the fixture linked below clearly states that the initialActive
state has id=1, let's use that to identify the initial state.Refer to https://github.com/cfpb/idea-box/blob/master/src/idea/fixtures/state.json which is loaded in the migrations