Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #119 from HXSecurity/bug/issue-173
Browse files Browse the repository at this point in the history
modify the default number of return items
  • Loading branch information
Bidaya0 committed Sep 3, 2021
2 parents a366a7d + f355a6a commit eee0daa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion iast/views/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class DocumentArgsSerializer(serializers.Serializer):
page_size = serializers.IntegerField(default=1)
page_size = serializers.IntegerField(default=20)
page = serializers.IntegerField(default=1)
language = serializers.CharField(default=None)

Expand Down
2 changes: 2 additions & 0 deletions iast/views/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def get(self, request, key):
return R.success(data={key: profile})

def put(self, request, key):
if not request.user.is_talent_admin():
return R.failure(msg=_("Current users have no permission to modify"))
fields = get_model_field(IastProfile, exclude=['id'])
data = {k: v for k, v in request.data.items() if k in fields}
profile = IastProfile.objects.filter(key=key).first()
Expand Down

0 comments on commit eee0daa

Please sign in to comment.