Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Update for invalidatedTasks #1669

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server/services/validator_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from flask import current_app
from sqlalchemy import text

from server.models.dtos.mapping_dto import TaskDTOs
from server.models.dtos.stats_dto import Pagination
Expand Down Expand Up @@ -212,9 +213,8 @@ def get_user_invalidated_tasks(as_validator, username: str, preferred_locale: st

if project_id is not None:
query = query.filter_by(project_id=project_id)

results = query.order_by(sort_by + " " + sort_direction).paginate(page, page_size, True)


results = query.order_by(text(sort_by + " " + sort_direction)).paginate(page, page_size, True)
project_names = {}
invalidated_tasks_dto = InvalidatedTasks()
for entry in results.items:
Expand Down