模板¶
try:
tag_obj = query_add_interests(tag, major)
if professor and tag_obj:
professor.interests.append(tag_obj)
db.session.flush()
except IntegrityError:
db.session.rollback()
介绍¶
- db.session.flush()
- db.session.rollback()