code: def first_or_404(self, description=None):
          
  
          rv = self.first()
          if rv is None:
              abort(404, description=description)
          return rv
docs: Like :meth:`first` but aborts with 404 if not found instead of returning ``None``.