Skip to content

Commit

Permalink
Merge e641557 into 333f644
Browse files Browse the repository at this point in the history
  • Loading branch information
philliproso committed Jun 10, 2016
2 parents 333f644 + e641557 commit f1bf3a9
Show file tree
Hide file tree
Showing 3 changed files with 438 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flask_restless/serialization/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _dump(self, instance, only=None):
if not c.startswith('__') and c not in COLUMN_BLACKLIST)
# Exclude column names that are foreign keys.
foreign_key_columns = foreign_keys(model)
columns = (c for c in columns if c not in foreign_key_columns)
columns = (c for c in columns if c not in foreign_key_columns or c == primary_key_for(model))

# Create a dictionary mapping attribute name to attribute value for
# this particular instance.
Expand Down
1 change: 1 addition & 0 deletions tests/test_polymorphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from sqlalchemy import Enum
from sqlalchemy import Unicode


from flask_restless import DefaultSerializer

from .helpers import check_sole_error
Expand Down
Loading

0 comments on commit f1bf3a9

Please sign in to comment.