Add support for allow_public flag in get_all_ex endpoint

Add `last_changed_by` field on task updates
Fix reports support
This commit is contained in:
allegroai
2022-12-21 18:32:56 +02:00
parent c7cd949fd0
commit ae4c33fa0e
23 changed files with 256 additions and 76 deletions

View File

@@ -0,0 +1,17 @@
import logging as log
from pymongo.collection import Collection
from pymongo.database import Database
from pymongo.errors import OperationFailure
def migrate_backend(db: Database):
"""
Drop task text index so that the new one including reports field is created
"""
tasks: Collection = db["task"]
try:
tasks.drop_index("backend-db.task.main_text_index")
except OperationFailure as ex:
log.warning(f"Could not delete task text index due to: {str(ex)}")
pass