Skip to content

Commit d7e8fe0

Browse files
committed
Fix issue related to creation of article.
See gothinkster/flask-realworld-example-app#20
1 parent e40db4c commit d7e8fe0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

conduit/articles/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_articles(tag=None, author=None, favorited=None, limit=20, offset=0):
4040
@jwt_required
4141
@use_kwargs(article_schema)
4242
@marshal_with(article_schema)
43-
def make_article(body, title, description, tagList=None):
43+
def make_article(body, title, description, author=None, tagList=None):
4444
article = Article(title=title, description=description, body=body,
4545
author=current_user.profile)
4646
if tagList is not None:

conduit/profile/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ProfileSchema(Schema):
1111
# ugly hack.
1212
profile = fields.Nested('self', exclude=('profile',), default=True, load_only=True)
1313

14-
@pre_load
14+
# @pre_load
1515
def make_user(self, data, **kwargs):
1616
return data['profile']
1717

0 commit comments

Comments
 (0)