Skip to content

Commit

Permalink
Merge pull request #44 from codepost-io/fix/trailing-slashes-2
Browse files Browse the repository at this point in the history
resolve trailing slash on list_submissions
  • Loading branch information
rfreling authored Oct 4, 2023
2 parents f685be6 + e8b2a9f commit 2abef85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codepost/models/abstract/api_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def instance_endpoint_by_id(self, id=None):
pass

# CASE 2: The class end point has not formatting parameter
return urljoin(self.class_endpoint, "{}".format(_id))
return urljoin(self.class_endpoint, "{}/".format(_id))

@property
def instance_endpoint(self):
Expand Down
2 changes: 1 addition & 1 deletion codepost/models/assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def list_submissions(self, id=None, student=None, grader=None):

id = self._get_id(id=id)

endpoint = "{}/submissions".format(self.instance_endpoint_by_id(id=id))
endpoint = "{}submissions".format(self.instance_endpoint_by_id(id=id))
endpoint_params = {}

if student != None:
Expand Down
2 changes: 1 addition & 1 deletion codepost/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Version number
__version__ = "0.3.1"
__version__ = "0.3.2"

0 comments on commit 2abef85

Please sign in to comment.