title: Am I using get_or_create correctly?
body: <p>Trying to use a single view for update and create operations.</p>
  
  <p>I employ two different urls:</p>
  
  <pre><code>url(r'^update/(?P&lt;pk&gt;[0-9]+)/$', BoardUpdateView.as_view(), name='board-update'),
  url(r'^update/$', BoardUpdateView.as_view(), name='board-create'),
  </code></pre>
  
  <p>Then I use this as my class:</p>
  
  <pre><code>class BoardUpdateView(UpdateView):
      model = Board
      fields = ['author']
  
      context_object_name = 'board'
  
      def get_object(self, queryset=None):
          if "pk" not in self.kwargs:
              self.kwargs['pk']=None
          obj, created = Board.objects.get_or_create(pk=self.kwargs['pk'],
               defaults={'author': self.request.user})
  
        return obj
  </code></pre>
  
  <p>I know there are many ways to use Python, but I wondered if this approach is going to lead to any issues, or if there is a more idiomatic way to do this?  For example, my check for whether <code>pk</code> exists or not seems weird/gross.</p>