Skip to content

Commit

Permalink
Code review - fix typo and UNSET import
Browse files Browse the repository at this point in the history
  • Loading branch information
EvSpirit committed Jul 30, 2024
1 parent 5758b68 commit 3354380
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strawberry_django/mutations/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _parse_pk(

if key_attr in value:
obj_pk = value[key_attr]
if obj_pk not in (None, strawberry.UNSET): # noqa: PLR6201
if obj_pk not in (None, UNSET): # noqa: PLR6201
return model._default_manager.get(pk=obj_pk), value

return None, value
Expand Down Expand Up @@ -244,7 +244,7 @@ def prepare_create_update(
if dataclasses.is_dataclass(data):
data = vars(data)

# `pk` may be explicitly passed as `None` to force crete object, `pk` is not a field and won't be handled below,
# `pk` may be explicitly passed as `None` to force create object, `pk` is not a field and won't be handled below,
# so manually add one into `direct_field_values`
pk = data.pop("pk", UNSET)
if pk is not UNSET:
Expand Down

0 comments on commit 3354380

Please sign in to comment.