code: def create_missing(self):
          
          if getattr(self, 'content_type', '') == 'docker':
              self._fields['docker_upstream_name'].required = True
          super(Repository, self).create_missing()
docs: Conditionally mark ``docker_upstream_name`` as required.
  
          Mark ``docker_upstream_name`` as required if ``content_type`` is
          "docker".