original_docstring: Mark an existing database entry as completed.
docstring: Mark an existing database entry as completed.
docstring_tokens: Mark an existing database entry as completed .
code: def complete(cls, quest_id=None, session=None):
          """Mark an existing database entry as completed."""
          if session is None:
              session = db.session
  
          instance = cls.get_by_id(quest_id)
          instance.last_updated = datetime.now()
          instance.completed_date = datetime.now()
          instance.status = False
  
          session.add(instance)
          session.commit()
          return instance
code_tokens: def complete ( cls , quest_id = None , session = None ) : if session is None : session = db . session instance = cls . get_by_id ( quest_id ) instance . last_updated = datetime . now ( ) instance . completed_date = datetime . now ( ) instance . status = False session . add ( instance ) session . commit ( ) return instance
short_docstring: Mark an existing database entry as completed.
short_docstring_tokens: Mark an existing database entry as completed .
comment: """Mark an existing database entry as completed."""