comments: fix extracing auth_user from the passed in objects. Before if auth_user is empty we could relly on INT or STR passed in
This commit is contained in:
parent
26ec398df0
commit
5c62c69d2a
1 changed files with 1 additions and 1 deletions
|
|
@ -191,7 +191,6 @@ class CommentsModel(BaseModel):
|
|||
:param renderer: pick renderer for this comment
|
||||
"""
|
||||
|
||||
auth_user = auth_user or user
|
||||
if not text:
|
||||
log.warning('Missing text for comment, skipping...')
|
||||
return
|
||||
|
|
@ -203,6 +202,7 @@ class CommentsModel(BaseModel):
|
|||
|
||||
repo = self._get_repo(repo)
|
||||
user = self._get_user(user)
|
||||
auth_user = auth_user or user
|
||||
|
||||
schema = comment_schema.CommentSchema()
|
||||
validated_kwargs = schema.deserialize(dict(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue