Skip to content

Commit

Permalink
DH-4778 fix migration script (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
DishenWang2023 committed May 7, 2024
1 parent 6ec3d97 commit c2a2cb0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@

if query_response:
question_id = ObjectId(query_response["question_id"])
updated_by = ObjectId(doc["updated_by"])

if "updated_by" in doc:
updated_by = ObjectId(doc["updated_by"])
else:
updated_by = None
# add new field question id, change updated_by to ObjectId
data_store[query_collection].update_one(
{"_id": doc["_id"]},
Expand Down

0 comments on commit c2a2cb0

Please sign in to comment.