Skip to content

Commit

Permalink
Actually, let's not edit run_start; tis a silly prop 🏰
Browse files Browse the repository at this point in the history
  • Loading branch information
Kezzsim committed Feb 5, 2024
1 parent b566dfa commit 34f19df
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions suitcase/mongo_normalized/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,9 @@ def update(self, name, doc):
for field in restricted_fields:
if field in old and field in doc:
if old[field] != doc[field]:
# Allow the removal of restricted fields, but not update
if doc[field] is not None:
raise ValueError(
f"Field '{field}' is restricted and cannot be changed."
)
raise ValueError(
f"Field '{field}' is restricted and cannot be changed."
)
target_uid_docs = revisions_col.find({"document.uid": doc["uid"]})
cur = target_uid_docs.sort([("revision", pymongo.DESCENDING)]).limit(1)
wrapped = dict()
Expand Down

0 comments on commit 34f19df

Please sign in to comment.