Merge "db: add commit action after querying"

This commit is contained in:
Zuul 2024-03-28 07:00:14 +00:00 committed by Gerrit Code Review
commit 3863b81a18
1 changed files with 5 additions and 2 deletions

View File

@ -54,8 +54,11 @@ def find_all(model, **conditions):
def find_all_by_limit(query_func, model, conditions, limit, marker=None,
marker_column=None):
return _limits(query_func, model, conditions, limit, marker,
marker_column).all()
query = _limits(query_func, model, conditions, limit, marker,
marker_column)
res = query.all()
query.session.commit()
return res
def find_by(model, **kwargs):