       @updateSugarSubscription nextProps.project
       @context.geordi?.remember projectToken: nextProps.project?.slug
     else if nextProps.preferences?.preferences.selected_workflow isnt @state.selectedWorkflow?.id
-      @getSelectedWorkflow nextProps.project, nextProps.preferences
+      @getSelectedWorkflow(nextProps.project, nextProps.preferences)
 
   fetchInfo: (project) ->
     @setState

  getSelectedWorkflow: (project, preferences) ->
    @setState selectedWorkflow: 'PENDING'

    preferredWorkflowID = preferences?.preferences.selected_workflow ? project.configuration?.default_workflow
    if preferredWorkflowID?
      apiClient.type('workflows').get preferredWorkflowID
        .then (workflow) =>
          if workflow.active
            @setState selectedWorkflow: workflow

  componentDidMount: ->
    @_boundForceUpdate = @forceUpdate.bind this
    @fetchProjectData @props.params.owner, @props.params.name, @props.user
      # .then =>
      #   # For testing! Simulating a new assignment coming in after some time.
      #   setTimeout ( => 
      #     console.log('set selected workfow')
      #     @state.preferences.update "preferences.selected_workflow": '2333'
      #   ), 5000

  componentWillReceiveProps: (nextProps) ->
    {owner, name} = nextProps.params
