Skip to content

Commit

Permalink
Attach HyperlinkRelated to Marshmallow objects
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Apr 28, 2016
1 parent c36fdf9 commit edfd569
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions flask_marshmallow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(self, app=None):
self.Schema = Schema
if has_sqla:
self.ModelSchema = sqla.ModelSchema
self.HyperlinkRelated = sqla.HyperlinkRelated
_attach_fields(self)
if app is not None:
self.init_app(app)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sqla.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_hyperlink_related_field(self, extma, models, db, extapp):
class BookSchema(extma.ModelSchema):
class Meta:
model = models.Book
author = HyperlinkRelated('author')
author = extma.HyperlinkRelated('author')

book_schema = BookSchema()

Expand Down

0 comments on commit edfd569

Please sign in to comment.