Skip to content

Commit

Permalink
fixed foreign key attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Oct 22, 2024
1 parent 588f909 commit a104694
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions django_mongodb/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
"mongo_fields.test_listfield.IterableFieldsTests.test_lt",
"mongo_fields.test_listfield.IterableFieldsTests.test_lte",
"mongo_fields.test_listfield.IterableFieldsTests.test_Q_objects",
# To debug:
"mongo_fields.test_embedded_model.EmbeddedModelFieldTests.test_foreign_key_in_embedded_object",
# 'NulledTransform' object has no attribute 'as_mql'.
"lookup.tests.LookupTests.test_exact_none_transform",
# "Save with update_fields did not affect any rows."
Expand Down
2 changes: 1 addition & 1 deletion django_mongodb/fields/embedded_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def get_db_prep_save(self, embedded_instance, connection):
# Exclude unset primary keys (e.g. {'id': None}).
if field.primary_key and value is None:
continue
field_values[field.name] = value
field_values[field.attname] = value
# Let untyped fields store model info alongside values.
# Use fake RawFields for additional values to avoid passing
# embedded_instance to database conversions and to give
Expand Down

0 comments on commit a104694

Please sign in to comment.