original_docstring: Modify an existing quest database entry.
docstring: Modify an existing quest database entry.
docstring_tokens: Modify an existing quest database entry .
code: def modify(cls, quest_id, title=None, description=None, quest_giver=None,
                 location=None, session=None):
          """Modify an existing quest database entry."""
          if session is None:
              session = db.session
  
          instance = cls.get_by_id(quest_id)
  
          if title:
              instance.title = title
  
          if description:
              instance.description = description
  
          if quest_giver:
              instance.quest_giver = quest_giver
  
          if location:
              instance.location_given = location
  
          instance.last_updated = datetime.now()
  
          session.add(instance)
          session.commit()
          return instance
code_tokens: def modify ( cls , quest_id , title = None , description = None , quest_giver = None , location = None , session = None ) : if session is None : session = db . session instance = cls . get_by_id ( quest_id ) if title : instance . title = title if description : instance . description = description if quest_giver : instance . quest_giver = quest_giver if location : instance . location_given = location instance . last_updated = datetime . now ( ) session . add ( instance ) session . commit ( ) return instance
short_docstring: Modify an existing quest database entry.
short_docstring_tokens: Modify an existing quest database entry .
comment: """Modify an existing quest database entry."""