Skip to content

Commit

Permalink
Fix issue related to creation of article.
Browse files Browse the repository at this point in the history
  • Loading branch information
rajgoesout committed Apr 2, 2020
1 parent e40db4c commit d7e8fe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conduit/articles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_articles(tag=None, author=None, favorited=None, limit=20, offset=0):
@jwt_required
@use_kwargs(article_schema)
@marshal_with(article_schema)
def make_article(body, title, description, tagList=None):
def make_article(body, title, description, author=None, tagList=None):
article = Article(title=title, description=description, body=body,
author=current_user.profile)
if tagList is not None:
Expand Down
2 changes: 1 addition & 1 deletion conduit/profile/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ProfileSchema(Schema):
# ugly hack.
profile = fields.Nested('self', exclude=('profile',), default=True, load_only=True)

@pre_load
# @pre_load
def make_user(self, data, **kwargs):
return data['profile']

Expand Down

0 comments on commit d7e8fe0

Please sign in to comment.