Skip to content

Commit

Permalink
fix: always get model id
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Feb 6, 2024
1 parent cdec8f8 commit e1cf1fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codeforlife/tests/model_view_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def generic(

def _assert_create(self, json_model: JsonDict):
model = self._model_class.objects.get(
**{self._lookup_field: json_model[self._lookup_field]}
**{self._lookup_field: json_model["id"]}
)
self._assert_serialized_model_equals_json_model(model, json_model)

Expand Down

0 comments on commit e1cf1fc

Please sign in to comment.