Skip to content

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibola committed Jan 6, 2025
1 parent b2096db commit 541b214
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions django_mongodb_backend/fields/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def get_prep_value(self, value):
# A manually assigned integer ID?
if isinstance(value, str) and value.isdigit():
return int(value)
raise ValueError(
f"Field '{self.name}' expected an ObjectId but got {value!r}."
) from e
raise ValueError(f"Field '{self.name}' expected an ObjectId but got {value!r}.") from e

def get_internal_type(self):
return "ObjectIdAutoField"
Expand Down

0 comments on commit 541b214

Please sign in to comment.